- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 09:55 PM
Notification trigger in approval table and body passing dynamic, but customer need catalog varaible description
How can I acces catalog varaible description in notification.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 03:15 AM
\Hi,
Your query is wrong in GlideRecord.
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 09:59 PM - edited 12-18-2023 10:01 PM
Hi @Gillerla Rajesh ,
In this case u need to use email script functionality in notification here where u can write a GlideRecord query n fetch the catalog description.
Please check this link for email script creation n how to use in servicenow
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 10:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 11:41 PM
Hi @Gillerla Rajesh ,
Sure. Please find the code which needs to be written in email script
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
var gr = new GlideRecord("sc_cat_item");
gr.addQuery("sys_id", "enter value of ur catalog item sys id");
gr.query();
if (gr.next()) {
template.print(gr.description); // if u want to print short description modify the variable name accordingly
}
})(current, template, email, email_action, event);
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 03:13 AM