How to Add VIP visual indicator for “Requested for” on REQ and RITM (similar to Incident Caller VIP)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Team,
I have a requirement to visually highlight VIP users on the REQ and RITM
Requirement
On the REQ and Requested Item [sc_req_item] form:
- Field: Requested for (requested_for)
- If the selected user has VIP = true (in sys_user.vip):
- Show a VIP icon / decoration on the field, and optionally
- Change the field text color (e.g., red) to make it stand out
- If the user is not VIP:
- No VIP indicator / normal display
This needs to work both when:
- The RITM and REQ is opened (onLoad)
- The Requested for field is changed by the user (onChange)
I have created client script for both tables
for REQ it is working fyn - VIP is highlighting
for RITM it is not working
client script for ritm
function onChange(control, oldValue, newValue, isLoading) {
var callerLabel = $('label.sc_req_item.requested_for');
var callerField = $('sys_display.sc_req_item.requested_for');
if (!callerLabel || !callerField)
return;
if (!newValue) {
callerLabel.setStyle({backgroundImage: ""});
callerField.setStyle({color: ""});
return;
}
g_form.getReference('requested_for', vipCallerCallback);
}
function vipCallerCallback(caller) {
var callerLabel = $('label.sc_req_item.requested_for').down('label');
var callerField = $('sys_display.sc_req_item.requested_for');
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: ""});
}
}
O/P
what was the mistake in my script
@Ankur Bawiskar - i have configured as per your scritpt provided here ( https://www.servicenow.com/community/developer-forum/how-to-add-vip-visual-indicator-for-requested-f...)
could u please help me here @Ankur Bawiskar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
this link has approach, you need to check and tweak it
Show VIP flag for Requested for on REQUEST, RITM and on task?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
@Ankur Bawiskar Yes i already gone through - unable to find the mistake could u please help me where was the mistake i have done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
@Ankur Bawiskar could you please help me on this fix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
38m ago
from the list view - it is showing - but in form view it is not showing
please help me here

