Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to hide 'order now' button dynamically in a catalog without using DOM Manipulation

Raphael Dizon
Mega Expert

Hello,

Does anyone have any alternatives of hiding the 'order_now' button in a catalog aside from using DOM Manipulations? I am aware that it's not best practice to use DOM Manipulation that's why I am trying to find other ways to hide the 'order now' button whenever a certain value in a field is selected. 

Here is a screenshot of my Catalog Client Script which is working but not a best practice.

find_real_file.png

Any help would be appreciated. Thank you.

Kind Regards,

Raphael

17 REPLIES 17

You have to use GlideRecord('sc_cat_item') and take up the particular item for which you want the specified functionality.

order now how to remove and add please navigation  explain  find_real_file.png

Itzariana
Tera Contributor

Hello all,

I am just learning scripts so I was hoping to get more details. I would like to hide "Add to Cart" and "Order Now" button if Variable name [open_and_sign_pdf_documents = yes].

 

I don't know how to write this script on my own so if someone could provide one based on the criteria above I would appreciate it!