Need to trigger email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 08:29 AM - edited 08-21-2023 08:30 AM
Hi All,
I need to trigger the email notification to the catalog item owner, when the schedule job trigger.
Body of the email
Hi ${u_cat_item_owner},
You have received this email because you are the owner of the catalog item ${name}.
Please review the form for any of the below points.
1) Any improvement on the form
2) Any enhancement on the existing from
3) How frequently you are using the form (Volume of usage).
NOTE :
1. ${u_cat_item_owner} name of the catalog item owner
2. ${name} name of the catalog item
Source Code:
<p>Hi ${<label dir="ltr" for="sys_display.sc_cat_item.u_cat_item_owner"><span title="" data-original-title="" data-html="false"><a title="" target="_blank" data-original-title="Open reference table list (click) or record (ctrl+click): sys_user">u_cat_item_owner}</a></span></label>,</p>
<p>You have received this email because you are the owner of the catalog item ${name}.<br />Please review the form for any of the below points.</p>
<p>1) Any improvement on the form<br />2) Any enhancement on the existing from<br />3) How frequently you are using the form (Volume of usage).</p>
<p> </p>
This is not working as expected,
Please any one provide me the input,
Thanks in advance,
Vinuth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 08:32 AM
Hi @vinuth v what is the issue you are facing here can you please bit elaborate the issue please!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 08:45 AM
Hello @vinuth v ,
As per my understanding you are triggering the notification through schedule job. Thus it is not possible for the notification to pick up values from record in the main body of the notification.
If you need to display the data use the event parameters and call them in the notification.
Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 09:42 AM
You need to create an event, then call that event from the scheduled job using
gs.eventQueue(<EVENT_NAME>, <GLIDE_RECORD> , <EVENT.PARM1> , <EVENT.PARM2>);
Here Event.parm1 and 2 can be your variables which you can pass from the scheduled job.
Then, in the notification's "When to send" section. change the Send when to Event is fired.
Then select your event.
Note: You can create an event from Event Registry.
Hope this answers your query.