- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2022 11:30 PM
Hi
I have a requirement to display a custom VIP icon at Catalog creation level for a variable set.
I did the following and its working fine for REQ form level.
- Image loaded to the db_image and then used a field style to display the icon whenever the VIP is true for List view of REQ records
- Wrote a on-change client script , so it takes care of displaying the icon whenever the requested for changes at the REQ form level
I am stuck at displaying the icon at catalog creation level, as i couldn't find options in field styles level to do it. Can anyone suggest, what are the other options.
Regards
Priya
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2022 02:31 AM
Hi
I am trying to set it at the platform level, when someone initiate the order of the catalog item. Alternatively i tried an onChange client script to display a fieldmsg and add decoration, both didn't work. Attaching the screenshot for reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2022 11:54 PM
Hi,
if you are talking about portal then that client script won't work possibly because it uses DOM manipulation and DOM won't work on portal
Share the script you are using and the script screenshot
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
‎09-15-2022 02:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2022 02:49 AM
Its working! Just realised, i am not getting the Value to compare !
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
//Type appropriate comment here, and begin script below
var caller = g_form.getReference('requested_for', highlightVIP);
function highlightVIP(caller) {
alert(caller.vip);
if (caller.getValue('vip') == 'true') {
alert("caller is a VIP");
g_form.showFieldMsg('requested_for','VIP User','error');
}
else{
alert("Caller is not a VIP");
}
}
}
This script works !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2022 02:56 AM
Glad to know.
Please close the thread by marking your own response as correct
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader