VIP Flag Visibility
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2021 05:08 AM
Hi All,
Currently the VIP flag only shows when the VIP is in the “Caller” field, but often raised on behalf of a VIP, so needs to show as a flag on both “Caller” and “On Behalf Of”.
I have checked client script Highlight VIP caller and created similar one for on behalf of with some changes in it. But it is not working . Could you please help here with suggestions.
function onChange(control, oldValue, newValue, isLoading) {
var callerLabel = $('label.incident.u_on_behalf_of');
var callerField = $('sys_display.incident.u_on_behalf_of');
if (!callerLabel || !callerField)
return;
if (!newValue) {
callerLabel.setStyle({
backgroundImage: ""
});
callerField.setStyle({
color: ""
});
return;
}
g_form.getReference('u_on_behalf_of', vipCallerCallback);
}
function vipCallerCallback(caller) {
var callerLabel = $('label.incident.u_on_behalf_of').down('label');
var callerField = $('sys_display.incident.u_on_behalf_of');
if (!callerLabel || !callerField)
return;
//check for VIP status
if (caller.vip == 'true') {
var bgPosition = "95% 55%";
if (document.documentElement.getAttribute('data-doctype') == 'true')
bgPosition = "5% 45%";
callerLabel.setStyle({
backgroundImage: "url(images/icons/vip.gif)",
backgroundRepeat: "no-repeat",
backgroundPosition: bgPosition,
paddingLeft: '30px'
});
callerField.setStyle({
color: "red"
});
} else {
callerLabel.setStyle({
backgroundImage: ""
});
callerField.setStyle({
color: ""
});
}
}
Regards,
Madhuri
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2021 08:18 AM
Hi,
you want to highlight on behalf of field when caller changes right?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2021 09:36 AM
Yes Ankur, same as caller field highlights for VIP User.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2021 08:37 PM
Did you check any browser console error is coming?
Also did you check by adding alert etc in client script
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader