How to dynamically call multiple Email Templates from a Email Scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 07:56 AM
Hi,
There is an OOB Approval Rejection notification and it gets triggered to all task tables. But I have two templates which I want to call dynamically based on a condition added in the template which is selected in Approval Rejected Notification. This is because we don't want to modify OOB notification. Can anyone help in this?
I have tried the below approach and ended up as below.
When I preview the notification, it not printing the actual values of the table.
Thanks in Advance,
Sharan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 08:08 AM
can you try this in line 7
if(current.source_table == 'sc_request'){
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 08:25 AM
I have tried it, but it's not working. Actual values are not populated in the email body.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2024 12:39 AM
Hello @Sharan Ellendul ,
Have you got the solution?