Variable set is hiding when submitting from Order guide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have an order guide, in which 2 catalog item are there. one is pc purchase and other is new hire. When i submit from order guide then a variable set in pc purchase should be visible on ritm . When i submit pc purchase standalone then that variable set should not visible on ritm. It is working fine in platform view . But on service portal in ritm the variable set is not hiding.
For that i have applied client script on ritm
Does anyone has any idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
are you getting that value of order_guide variable?
what value you got on alert?
💡 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
3 weeks ago
@Ankur Bawiskar
we get the sys_id of order guide. if order guide is present. this script is working on backend, but in portal it is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
it won't work in portal
-> your existing onLoad make it Run only on Requested Item and not on Catalog Item view so that it works only on native
-> create another onLoad and make it run on Catalog Item View and use this script so that it works only for portal
function onLoad() {
//Type appropriate comment here, and begin script below
var url = top.locatio.href;
if (url.indexOf('sc_cat_item_guide') == -1) {
g_form.setMandatory('updated_new_hire_variables', false);
g_form.setMandatory('seattle_office_onboarding', false);
g_form.setDisplay('updated_new_hire_variables', false);
g_form.setDisplay('seattle_office_onboarding', false);
}
}
💡 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
3 weeks ago
@Ankur Bawiskar ,
In the order guide catalog item script i have to apply on