- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 05:15 AM
I have an order guide that auto generates some items and other items a user can select. When the request is created I want a single email that list all items that have been requested to go to the requester.
Number + Cat Item name
The following list shows the information that i would want in the email.
Solved! Go to Solution.
- Labels:
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 05:35 AM
Hi,
You would need to create a notification email script with following code (in this example I'm just adding the number and the item, but you can proceed and include all columns you want):
template.print("<p></p>Requested items:\n");
var gr = new GlideRecord("sc_req_item");
gr.addQuery("request", current.sys_id);
gr.query();
while(gr.next()) {
template.print(gr.number + ": " + gr.cat_item.getDisplayValue() + "\n");
}
Then you can call that email script from an email notification with (make sure that notification is setup for sc_request table and it's triggered when a record is updated or inserted):
${mail_script:name_of_your_script}
Hope it helps!
Joaquín
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 05:35 AM
Hi,
You would need to create a notification email script with following code (in this example I'm just adding the number and the item, but you can proceed and include all columns you want):
template.print("<p></p>Requested items:\n");
var gr = new GlideRecord("sc_req_item");
gr.addQuery("request", current.sys_id);
gr.query();
while(gr.next()) {
template.print(gr.number + ": " + gr.cat_item.getDisplayValue() + "\n");
}
Then you can call that email script from an email notification with (make sure that notification is setup for sc_request table and it's triggered when a record is updated or inserted):
${mail_script:name_of_your_script}
Hope it helps!
Joaquín