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
share screenshot of your existing client script.
where have you written that.
It should work with the approach I shared above
💡 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
this i have applied , but it is not working when submitting from order guide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you said your earlier script is working in native -> then keep it same
Create new one for Catalog Item view i.e. portal and script I shared
💡 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 ,
I have tried but did not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
what did you try?
-> earlier script you kept as it is and ensure it runs only on RITM
-> new script you created as per what I shared and that's not working on portal? did you check by adding alert what came in url?
-> I edited my script, there was a typo in that (top.location.href)
sharing again here
function onLoad() {
//Type appropriate comment here, and begin script below
var url = top.location.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