Display previous value of priority field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 03:30 AM
Hey
I need to display in the body of the notification the previous value of the priority field in the Incident form.
I would appreciate help on how to do this
Thanks, Shir.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 05:20 AM
Hi @Shir Sharvit ,
In code we are sending 2 parms
1. Current.caller_id
2. previous.priority
gs.eventQueue('incident.caller.changed',current, current.caller_id.getDisplayValue(),previous.priority);
What are you sending in parm1 and parm2 ?
Please mark my answer correct and helpful if this works for you
Thanks and Regard s
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 05:27 AM
this business rule:
this event:
and this notification:
What am I doing wrong that it doesn't work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 05:32 AM
Hi @Shir Sharvit ,
In BR you mentioned like
gs.eventQueue('incident.caller.changed',current,previous.priority.getDisplayValue());
Which is wrong syntax. You need to pass 1 glideRecord and 2 parms
gs.eventQueue('incident.caller.changed',current,parm1, parm2);
You can try this-
gs.eventQueue('incident.caller.changed',current,current.number, previous.priority);
In Subject you have to pass parm2 bcoz it contains the value of priority
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 05:58 AM
Hey
I didn't understand what to fix for it to work in BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2024 12:14 AM
Hi @Shir Sharvit ,
Please update your BR with below code
(function executeRule(current, previous /*null when async*/) {
// Add your code here
gs.log("CHECK priority = " + current.priority.getDisplayValue() + " ________ " + previous.priority.getDisplayValue());
gs.eventQueue('incident.caller.changed',current, current.priority.getDisplayValue(),previous.priority.getDisplayValue());
})(current, previous);
Result
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak