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



Jul 21, 2011, 8:56 PM
45 Posts

Re: Send Document Link in Email from XPage

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role: End user
  • Tags:
  • Replies: 4
Many thanks Judy,
 
Is this right all this just to replace the '@Mailsend - inc Doc Link' in XPages we need all this? Just when I think I am getting somewhere with XPages!
 
Your sample appears to contain LotusScript, are we at cross purposes here?  The form I am using is in XPages  I just want to send an email to Notes client users with a doc link to the XPage when the user submits it. I am not really bothered about MIME, but thought that was the way to do it, with the lack of an @MailSend option. When would one use the 'appendDocLink()' method in javascript?
 
I will study your suggestions though, many thanks.  
Jul 22, 2011, 12:34 PM
31 Posts
Re: Send Document Link in Email from XPage
Hi Mark, I thought you were trying to create a MIME email.  They're really not that difficult -- once you create one MIME email, you'll find it's pretty easy.  I find they generally look more professional than strictly richtext emails, just my opinion.
 
You can run a LotusScript agent in the PostSaveDocument event (which is the way I did it in 8.5.1) -- I think now in 8.5.2 you can also get a handle to the in-memory document in the QuerySaveDocument event too.  You're right there's no @MailSend anymore in XPages.  But you don't have to run a LS agent; you can also write some Server-side Javascript using methods & properties that look a lot like LotusScript, take a look in the Help -- you should be able to just append a doclink to a richtext item via SSJS if that's your desire.  So you'd just need to create a virtual/temporary Form="Memo" document and add a "Body" RT field & create your email that way & then do a doc.Send at the end. 
 
Here's a snippet from the Help:

Syntax

appendDocLink(doc:NotesDocument) : void

appendDocLink(db:NotesDatabase) : void

appendDocLink(vw:NotesView) : void

appendDocLink(doc:NotesDocument, comment:string) : void

appendDocLink(db:NotesDatabase, comment:string) : void

appendDocLink(vw:NotesView, comment:string) : void

Parameter Description
Document doc The document to which you want to link.
Database db The database to which you want to link.
View vw The view to which you want to link.
String comment The text that appears when a user presses and holds the mouse over the link.
String hotspottext Boxed text which the user clicks to follow the link. This text appears in place of a token.


 

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