Crow Canyon Software Forum
Functions in email templates
Quote from pf-amalin on November 4, 2022, 5:23 pmCan we use functions in email templates? For instance, I'd like to append a Source parameter at the end of the Edit Item link so it returns to the list rather than the site homepage when a user clicks [Close]. I've tried using place holders, hard-coding, and building the full URL with a variable:
- strcat([[Edit Item||Edit Item]],[[List Link||List Link]])
- strcat([[Edit Item||Edit Item]],&Source=https://Contoso.sharepoint.com/sites/TestSite/Lists/TestList)
- <a href="[[Edit Item||Edit Item]],&Source=[[List Link||List Link]]">Update Item</a>
- <a href="[[Edit Item||Edit Item]]&Source=https://Contoso.sharepoint.com/sites/TestSite/Lists/TestList">Update Item</a>
...and various interations of [[FileRef||URL Path]]
I thought I saw an article somewhere that described how to use functions in email templates, but I can't find it now.
Can we use functions in email templates? For instance, I'd like to append a Source parameter at the end of the Edit Item link so it returns to the list rather than the site homepage when a user clicks [Close]. I've tried using place holders, hard-coding, and building the full URL with a variable:
- strcat([[Edit Item||Edit Item]],[[List Link||List Link]])
- strcat([[Edit Item||Edit Item]],&Source=https://Contoso.sharepoint.com/sites/TestSite/Lists/TestList)
- <a href="[[Edit Item||Edit Item]],&Source=[[List Link||List Link]]">Update Item</a>
- <a href="[[Edit Item||Edit Item]]&Source=https://Contoso.sharepoint.com/sites/TestSite/Lists/TestList">Update Item</a>
...and various interations of [[FileRef||URL Path]]
I thought I saw an article somewhere that described how to use functions in email templates, but I can't find it now.
Quote from supportTeam on November 8, 2022, 6:35 amFunctions are not supported in mail templates. We can build a hyperlink in the mail template to set edit item link along with source parameter as shown in sample URL below.
Sample URL: https://Contoso.sharepoint.com/sites/TestSite/Lists/TestList/ccs_EditForm.aspx?ID=[[ID||ID]]&Source=https://Contoso.sharepoint.com/sites/TestSite/Lists/TestList
Functions are not supported in mail templates. We can build a hyperlink in the mail template to set edit item link along with source parameter as shown in sample URL below.
Sample URL: https://Contoso.sharepoint.com/sites/TestSite/Lists/TestList/ccs_EditForm.aspx?ID=%5B%5BID||ID]]&Source=https://Contoso.sharepoint.com/sites/TestSite/Lists/TestList
Uploaded files: