发送电子邮件的备注链接以便直接从电子邮件客户端打开时,我遇到了问题。我创建的链接是无效的吗?我可以知道哪个是发送备注链接打开xpages页面的正确方法吗?
问题1.如何通过点击备注链接在包含文档ID的xpages中打开文档?
单向:我理解的是表格显示xpages。我可以知道还有其他办法吗?
问题2.如何打开没有文档ID的Xpages页面就像包含视图的页面一样。
我的doclink写成:
var doclink="notes://"+server+"/"+dname.replace(/(\\)/g, "/")+"/"+document1.getDocument().getUniversalID()+"/Request_Form.xsp?OpenXpages"
我的viewlink写为:
var viewlink ="notes://" +server+"/"+dname.replace(/(\\)/g, "/")+"/"+"Request_View.xsp?OpenXPage"
我的服务器和数据库名称如下
以下是我发送电子邮件的脚本
var setdoc:NotesDocument = database.getProfileDocument("System Setting", "");
var server = setdoc.getItemValueString("MailDBSvr");
var dname = setdoc.getItemValueString("MailDbPath");
var web = setdoc.getItemValueString("InternetAddress");
var maildoc:NotesDocument = database.createDocument()//mdb.createDocument() //database.createDocument()
maildoc.replaceItemValue("Form", "Memo");
maildoc.replaceItemValue("Subject","Request for Email Account By "+document1.getItemValueString('Name'));
session.setConvertMime(false);
var stream = session.createStream();
stream.writeText("<html><body>");
stream.writeText("<p>Dear " + "department reviewer" + ",</p>");
stream.writeText('<p>Kindly review this request by '+document1.getItemValueString('Name')+" on "+I18n.toString(@Today(), 'dd/MM/yyyy')+ ",</p>");
// open in web (http://devsvr1.pcs.com.my/CN=ServerOne/O=dev!!Brooke%5CBrooke.nsf/Request_Form.xsp?databaseName=CN=ServerOne/O=dev!!Brooke%5CBrooke.nsf&documentId=5FBA577C3DF795AB4825819400274B0A&action=editDocument)
stream.writeText("<p>Please click "+"<a href='http://"+web+"/"+
database.getServer()+"!!"+
XSPUrl.encodeParameter(dname, "UTF-8") +
"/"+"Request_Form.xsp?databaseName="+server+"!!"+
XSPUrl.encodeParameter(dname,"UTF-8") +
"&documentId="+document1.getDocument().getUniversalID()+
"&action=editDocument'>here</a> to open requisition form</p>")
// open in notes client (notes://server/path/database.nsf/pagename.xsp?openXpage)
var doclink="notes://"+server+"/"+dname.replace(/(\\)/g, "/")+"/"+document1.getDocument().getUniversalID()+"/Request_Form.xsp?OpenXpages"
stream.writeText("<p><a href='"+doclink+"'>Click Here</a> if you are in the Notes Client. Thank you.</p>");
stream.writeText("<p>Or</p>");
// open in web (http://devsvr1.pcs.com.my/brooke/brooke.nsf/Request_View.xsp)
stream.writeText("<p>Click <a href='http://"+web+"/"+dname.replace(/(\\)/g, "/")+"/"+"Request_View.xsp?'>here</a> to view all requisitions.</p>");
// Open in notes Client
// @URLOpen("notes://server/Path/database.nsf/XPageName.xsp?OpenXPage")
var viewlink ="notes://" +server+"/"+dname.replace(/(\\)/g, "/")+"/"+"Request_View.xsp?OpenXPage"
stream.writeText("<p><a href='"+viewlink+"'>Click Here</a> if you are in the Notes Client. Thank you.</p>");
stream.writeText("<p> ***THIS IS AN AUTOMATED MESSAGE - PLEASE DO NOT REPLY DIRECTLY TO THIS EMAIL***</p>");
stream.writeText("</body></html>");
var body = maildoc.createMIMEEntity("Body");
body.setContentFromText(stream, "text/html;charset=UTF-8", 1725);
stream.close();
maildoc.closeMIMEEntities(true);
session.setConvertMime(true);
maildoc.replaceItemValue("SendTo",document1.getItemValue("Dep_rev"));
maildoc.send();
document1.getDocument().computeWithForm(true,true);
答案 0 :(得分:2)
您需要更改处理服务器名称的方式。 Notes URLs请勿使用服务器的完整规范名称。
所以将CN=ServerOne/O=Dev
更改为notes://
协议支持的内容。你可以使用:
ServerOne%2FDev
(使用@Name [缩写]并替换/使用%2f)ServerOne
(使用@Name [CN])www.yourserver.com
165.34.11.34
在所有情况下,您都需要确保Notes客户端正确解析服务器名称:
希望有所帮助