- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2023 07:24 AM
Hello Experts,
I want to highlight requested for field on request table and Ritm table as well as on Catalog task table. I wrote the Client script but it was not working. Could you please help on this.
function onLoad() {
var callerLabel = $('label.sc_task.request_item.request.requested_for');
var callerField = $('sys_display.sc_task.request_item.request.requested_for');
if (!callerLabel || !callerField)
return;
/*if (!newValue) {
callerLabel.setStyle({backgroundImage: ""});
callerField.setStyle({color: ""});
return;
}*/
g_form.getReference('request_item.request.requested_for', vipCallerCallbackREQ);
}
function vipCallerCallbackREQ(caller) {
var callerLabel = $('label.sc_task.request_item.request.requested_for').down('label');
var callerField = $('sys_display.sc_task.request_item.request.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' });
//set callerField color
callerField.setStyle({color: "red"});
} else {
callerLabel.setStyle({backgroundImage: ""});
callerField.setStyle({color: ""});
}
}
@Ankur Bawiskar @Sohail Khilji
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 03:13 AM
Hi ,
You can create a on change Client script for the requested for field and use below script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 01:28 AM
Hello, configure your client script like this:
and use this script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 03:13 AM
Hi ,
You can create a on change Client script for the requested for field and use below script