How to add VIP icon before field "Requested for" on RITM form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 11:56 PM
We have one on load client scrfipt that shows the VIP icon before "caller" field if user is VIP but when we created the same script as on load on because field "requested for" is read only then this script not working and not showing icon, please suggest.
Below is my on load client script that we have writted on sc_req_item table.
function onLoad() {
function vipCallerCallback(requested_for) {
var callerLabel = $('label.sc_req_item.request.requested_for').down('label');
var callerField = $('sys_display.sc_req_item.request.requested_for');
if (!callerLabel || !callerField)
return;
//check for VIP status
if (requested_for.vip == 'true') {
var bgPosition = "95% 55%";
if (document.documentElement.getAttribute('data-doctype') == 'true')
bgPosition = "40% 100% ";
callerLabel.setStyle({backgroundImage: "url(images/icons/vip.gif)", backgroundRepeat: "no-repeat", backgroundPosition: bgPosition,backgroundSize: '25px', paddingLeft: '30px',});
callerField.setStyle({color: "red"});
} else {
callerLabel.setStyle({backgroundImage: ""});
callerField.setStyle({color: ""});
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 12:02 AM
Hi @VIKAS MISHRA ,
The same functionality is available OOB on Incident table. You can utilize those scripts for your requirement.
Hope it helps and please mark helpful if it solves the issue.
Thanks,
Pooja Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 05:42 AM
Hi Pooja, thanks for revert.
Yes checked that script of incident table also but that is working fine for incident but not for ritm form when i using for ritm table, might possible the backend names of requested for field is wrong from my side
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 12:06 PM
@VIKAS MISHRA , did you get this to work on the RITM?