This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Mar 6, 2013, 11:32 AM
47 Posts
topic has been resolvedResolved

appendDocLink doesn't create the link

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: appendDocLink
  • Replies: 4
Hi,
 
I have a button that send email if certains conditions are met.  I receive the email but the link to the document is not there.  Also I put some values from the document in the email and I receive them.
 
Here is the code (the button is a submit button):
  

try {

// GET AND SET SOME VALUES - Submit button

var doc:NotesDocument = currentDocument.getDocument(true);

var docMemo:NotesDocument = database.createDocument();

docMemo.replaceItemValue("Form", "Memo");

docMemo.replaceItemValue("Subject", "Number used in test");

docMemo.replaceItemValue("sendTo", "SomeName@myCompany.com");

var rtitem:NotesRichTextItem = docMemo.createRichTextItem("Body");

rtitem.appendDocLink(doc);  // doesn't show the link

docMemo.send();

//*** END TESTING ***

} catch(e) {

e.toString();

}

viewStateBean.restoreState=true;

context.redirectToPage('Home');

 
Here is what I receive by email:

     (Document link: CN=bibis/O=yti)

 
What am I doing wrong?
 
 
Mar 6, 2013, 12:56 PM
14 Posts
Re: appendDocLink doesn't create the link
hi,
 
do you have an default-view in this database?
 
Arno  
Mar 6, 2013, 1:03 PM
47 Posts
Re: appendDocLink doesn't create the link
Yes I do.
Mar 6, 2013, 4:49 PM
14 Posts
Re: appendDocLink doesn't create the link
hi,
 
here is an example from me: 
 

   

    var Body_Memo:NotesRichTextItem = memo.createRichTextItem("Body")

    Body_Memo.appendText("…..")

    Body_Memo.addNewLine(2);

    Body_Memo.appendText("Link:")

 

 

    //GET THE SERVER NAME TO APPEND IN THE DOC URL

    var serverName:NotesName = session.createName(db.getServer());

    var strReplace = db;

    strReplace = @ReplaceSubstring(strReplace,"\\","/");

    //URL Construction using the Universal ID of the document

    var url:String = "http://"+serverName.getCommon()+"/"+strReplace+"/"+"xpKOM.xsp?documentId="+@Text(docID) +"&action=editDocument"

    Body_Memo.addNewLine();

    Body_Memo.appendText(url)

 

 

hope it helps you...
 
Arno   
Mar 7, 2013, 12:50 PM
47 Posts
Re: appendDocLink doesn't create the link
Thanks a lot, it is working :-)

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal