- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2018 01:33 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2018 01:53 AM
Run this code in Background Script -
var inc = new GlideRecord('incident');
inc.addQuery('number','INC0000019');
inc.query();
if(inc.next()){
if(inc.caller_id.vip == true)
{
gs.print("Caller is VIP");
}
else{
gs.print("Caller is not VIP");
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2018 01:53 AM
Run this code in Background Script -
var inc = new GlideRecord('incident');
inc.addQuery('number','INC0000019');
inc.query();
if(inc.next()){
if(inc.caller_id.vip == true)
{
gs.print("Caller is VIP");
}
else{
gs.print("Caller is not VIP");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2018 01:54 AM
VIP is field on user table < sys_user>. If for particular user it can be set it true
& Caller <User> for this incident having VIP field value true.
So in business rule, if need to show info message once record is updated/inserted
You can write below code
If checking via Business rule on incident number
if(current.caller_id.vip == true)
gs.addInfoMessage(current.caller_id.name +" is VIP caller);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2018 02:05 AM
Hi Vivek,
If you want just to check this particular Incident Record, you can go ahead with the Background Script, as suggested by nayan_awadhiya.
But in case, you want to perform a check on each incident for a VIP caller, and want to Highlight that or want to perform some other actions over it, you can make use of 1 Out Of The Box On Change Client Script, Highlight VIP Caller.
You can either copy this code or make changes in it, to enhance it as per your Requirement.
Please mark my answer as Correct/Helpful in case it helped.
Regards,
Vishrut