How can we disable SUBMIT button on Service portal and ITIL view when we select particular value on catalog variable on a catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2022 04:31 AM
How can we disable submit button on Service Portal view as well as ITIL view when we select Particular value under catalog variable on the catalog form
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2022 04:39 AM
Hi,
Instead of disabling the button which will be like customization to core OOB widget you can write a On Submit client script on your catalog item and restrict form submisision and your purpi=ose will be solved like below sample script:
Create a Catalog Client script of On Submit Type :
function onSubmit() {
//Type appropriate comment here, and begin script below
if (g_form.getValue('Variable Name') == 'Value here') {
return false;
}
}
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2022 04:40 AM
Hi,
you can use onSubmit catalog client script and stop the form submission
Showing/hiding the button would require DOM which is not recommended
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
02-21-2022 04:42 AM
Hi,
if you still require to show/hide the button then this link has script solution
Remove/disable/hide record producer Submit button.
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
02-21-2022 06:34 AM
Did you get a chance to check the above link which has script to show/hide?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader