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 12, 2014, 6:32 PM
8 Posts

Document Link in Xpages using SSJS

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 3

Dear Concerned,

I hope all is well. I am using SSJS script to send email. Current code is using stream to create hyperlinks for notes and web client in following format.

notes://serverip/abc.nsf/mainform.xsp/documentid?editdocument

for web client http://serverip/abc.nsf/mainform.xsp/0/documentid?editdocument

This creates two document links in email and which works without any issue but I have two problems.

1) what if my primary server fails and users are redirected to secondary server than above links don't work because server name in hyperlink is hard coded? What is solution of this issue??

2) When I forward hyperlink in notes richet client than its not editable? system opens xpage in read only format even in string its mentioned edit document? What is the solution this issue. 

 

I require guidance from the experts to create dynamic document clicks in email for web and notes client and want to open xpage in edit mode in rich client. Thanks in advnace

 

Kind Regards,

Qaiser

Jul 14, 2014, 12:20 PM
586 Posts
hmmm

I'm not sure about issue 2.  I can only assume that for issue 1 the solution is to have some kind of load balancer in front of the servers. I THINK Domino comes with something called Internet Cluster Manager...  Don't know..  Most people use a third party option I believe.  Maybe it's a load balancer...  Maybe it's some cloud thing like Amazon AWS....

 

this isn't really an XPages issue.  Any link can break if it points to a single server and that server is down.  So you might want to just look for information regarding that.

 

Good Luck

Jul 15, 2014, 7:15 AM
8 Posts
Thanks for reply

Actually when we using native formula and lotusscript code to appendDocument or includeDocLink than its works perfectly fine as clustering done at server level. Bu my issue is that in SSJS MIME based email where we provide / hard code all connection details for creation of hyperlink will not work even if clustering is done on server level because everything is hard coded at script.

If I use appendDocLink in SSJS its works fine in Rich Client except not enable Edit Mode even if mentioned in link details and 2nd its open data source on web (form data) instead of opening xpage while already enabled show xpage instead.

If possible please provide me a sample script /db in SSJS for composing email and attaching document link that would be great help.

Thanks,

Qaiser

 

 

Jul 15, 2014, 7:09 PM
453 Posts
I think item 2 is related to the deffault action on the XPage

I pass a SessionScope variable to the XPage ssUNID, in before page load I look at the URL and determine what the parameters are and set SSUNID. Then the formulafor the default Action is set to editDocument or openDocument. If SSUNID is null the action is createDocument. Works pretty well for me.


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