how to use gs.eventQueue() parameters in notification?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2023 06:39 AM
Hello
how to use gs.eventQueue() parameters in notification? I want to send an email and in email body I want to show that parameter. Like say for example I send the requester's full name. This I need to send from script include to email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2023 08:38 AM
Hi @dev115415 ,
Please refer the below link.
You need to use GlideRecord for a table from which you want to fetch the requester's full name
Please refer below script.
/* Catalog Client Script: On Submit */
var sysIdRitm = g_form.getUniqueValue();
var ajx = new GlideAjax('updateRemoveUsersDevices');
ajx.addParam('sysparm_status', "status");
ajx.addParam('sysparm_sysId', sysIdRitm);
ajx.getXML(updateValues);
function updateValues(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
}
/* Script Include: */
status: function (){
var sysId = this.getParameter('sysparm_sysId');
var ritmSysId = new GlideRecord('sc_req_item');
ritmSysId.getValue(sysId);
gs.info("Script Include - ritmSysId:" + ritmSysId);
gs.eventQueue('usr_updated',ritmSysId, ritmSysId.opened_by); // check field name for submitted by
}
and in the notification select Event parm 1 contains recipient
and
If my answer resolves your issue then please mark it as correct and helpful.
Regards,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2023 08:50 AM
My main objective is to know as to how to fetch the parameters in the message body of the email notification. Like I saw somewhere they use ${event.....} thing.