- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2020 06:18 AM
I would like to create a script to include in an Inbound Action that will set the Priority and Urgency to High if the incident is created by a user/member of the VIP Group.
Thanks in advance,
AJ
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2020 07:37 AM
Hi,
write before insert business rule on incident table.
conditon:
Write below code :
code:
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", current.caller_id);
gr.addQuery("vip", true);
gr.query();
if (gr.next()) {
current.impact = "1";
current.urgency = "1";
current.priority = "1";
}
})(current, previous);
Kindly mark helpful and correct if it works.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2020 07:37 AM
Hi,
write before insert business rule on incident table.
conditon:
Write below code :
code:
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", current.caller_id);
gr.addQuery("vip", true);
gr.query();
if (gr.next()) {
current.impact = "1";
current.urgency = "1";
current.priority = "1";
}
})(current, previous);
Kindly mark helpful and correct if it works.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2020 10:42 AM
Yes, I created a group (VIP), which includes all VIP members.
Thanks,
AJ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2020 10:39 AM
Thanks Harish,
Per your suggestion, using Business Rules is the best option because it addresses all different Contact Types as opposed to Inbound Actions which only addresses Contact Type of Email.
Thanks,
AJ