Set Email Subject from Email Script using Template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 02:43 AM
Hi All,
I'm stuck with some requirements that came our way. Basically we are trying to achieve two things -
1. We have wrote an Email Script to tag proper template to a notification(so the template is dynamic), to set the body we are simply using template.print and it is working fine. But we are not able to set the subject of the Email. It is not evaluating the variables present in the Email Template. So, if the subject is Incident Number: {number}. The same is printed as is. Need help here. The templates might be many and there might be many fields from Incident table in the template.
2. Based on certain conditions, we want to be able to either call another Email Script from one or a script include. I found on the community that we can simply call the script include like -
var sc = new ScriptIncludeName();
sc.functionName();
But again, this is not working. My script include atm only returns a static string.
Any help would be highly appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 03:10 AM
Hi Bhawna,
Can you please review the script which you have written, cause the method that you are using to call the script include looks fine.
Regards,
Dhruv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 03:13 AM
Thanks Dhruv. As pointed by you offline, the script includes doesn't work if we call the method directly inside template.print. So point #2 is resolved. 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2017 03:59 AM
Hi Bhawna,
I have a requirement similar to your 1st requirement : to populate templates dynamically to notification using email scripts.
Can you guide on how to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2017 05:09 AM
Hi Asha,
I wrote an Email script using GlideRecord on templates table to match
template name and read the subject and body from the template.