Catalog Item: Disable order/request/submit button based on variable value

Xavier_Wharton
Tera Guru

Hello Community,

 

I have a process owner who wants to disable the order/request/submit button if the requestor selects "no" on a specific variable. 

I added a video explanation for reference: https://youtu.be/65iwLAJr8as.

I'm new to scripting, so I would appreciate a complete answer with context 🙂.

How do I disable the submit button on a catalog item?
1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Xavier_Wharton 

if you want to show/hide the order/request button based on variable then you need to use onChange catalog client script and use DOM manipulation to achieve which is not recommended.

If you still wish to do then check the answer in below link and enhance it as per your requirement

Show/hide the submit button on catalog item form based on select box 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

@Xavier_Wharton 

it's not a best practice as per ServiceNow although many OOB scripts do use DOM manipulation.

It gets highlighted in health scan report

In the link I shared you can show/hide the button based on variable value

Can you share what script did you try so far and what didn't work?

If my response helped please mark it correct and close the thread so that it benefits future readers.

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader