Fire event from record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 06:49 AM
hello,
I have a record producer, and I need to trigger an event from a dropdown variable value.
So, on the record producer I have a variable called Location. If location = A, I want an event trigged so I can call it from a notification.
I have this in the Record Producer script but it is not working..
I dont think i have it coded properly. Any ideas?
Thanks
var location = producer.associate_site_and;
if (location == 'Internal - Charlotte') {
gs.eventQueue("contact_center_internal", current, eventParm1);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 06:52 AM
try below
var location = producer.associate_site_and.getDisplayValue();
if (location == 'Internal - Charlotte') {
gs.eventQueue("contact_center_internal", current, '', '');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 07:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 06:55 AM
Hi There,
Can you check if the name of event is correct? and this event must be present in your event registry table as well. Plus the parameter also should be either in single quotes or it should be a variable. So please declare eventParm1 before using it.
Could you please confirm these?
Thank,
Mohit Kaushik
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 07:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2020 08:11 AM
Hi Sandy,
Just pass '' in place of current also and try.
gs.eventQueue("contact_center_internal",'','','');
Check the below link also
https://community.servicenow.com/community?id=community_question&sys_id=f2146127db678c94414eeeb5ca96194c
Thanks,
Mohit Kaushik
Mohit Kaushik
ServiceNow MVP (2023-2025)