cancel
Showing results for 
Search instead for 
Did you mean: 

Document's URL in Custom Mail Template

Former Member
0 Kudos

Hi Experts,

     I would like to send document's URL in a custom e-mail. I tried to used '%DOCUMENT_URL%' in the mail template,but it did not work. So i found this thread 'http://scn.sap.com/thread/3156061', it seems to be that i have to write the URL by the scripting. I think there should be some APIs for the this, since the standard e-mails are using the URL a lot. Can you please advise.

Thank you in advance,

Noppong Jinbunluphol

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Custom emails do not have the global tokens avaiable. Hence you might want to create an extension field (String) to save the url to the contract summary page. The link to the contract document then must be appended to the url created using scripting:

If using scripting context on Master agreement, then the code looks something like this:

docLink = doc.getObjectReference().toLinkString();

Append this docLink to the value from url:

doc.getExtensionField("url") + docLink

The url should be like this for example:

http://[HOST]:[PORT]/[CONTEXT]/fsbuyer/contracts/contracts_summary,

Hope this helps!

Regards,

Bindu

Former Member
0 Kudos

Hi Bindu,

     Thank you for your answer. It is very helpful for me.

Thank you

Noppong

Answers (0)