how to restrict catalog client script to run if item is order guide in servicenow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Team,
I am using the same variable set in both "Order guide" and "Catalog item".
But client script should run only if the item Catalog item and not the Order Guide.
Can any one help on this(It should work in portal and Native Ui)
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @vivekreddym ,
Use below script in your onload client script :
function onLoad() {
var isOrderGuide = g_service_catalog.isOrderGuide();
if(isOrderGuide) {
//part of an order guide you can hide the variables accordingly.
} else {
//not a part of an order guide.
}
}
If my response helped, please mark it as the accepted solution ✅ and give a thumbs up👍.
Thanks,
Anand
