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.

Disable or Hide "submit" button on catalog items when rendered from an order guide

ruchika2
Mega Contributor

Hi all,

I'm looking for   a way to disable or hide the "submit" button on a catalog item when the item is invoked from an order guide.

hide submit button.png

        Fig: The above snapshot was taken from a servicenow pre-existing catalog item.

I looked at "catalog_item_default" UI Macro and found that the following 3 lines are responsible for displaying the "submit" button:

<j:if test="${sc_cat_item.no_order != true}">

g_cart.attachWindow('qty', 'cart', "${gs.getMessage('Order this Item')}");

</j:if>

Can someone suggest which variable I should check in the macro to determine if the item is called from an order guide so I can disable it? I don't want to modify {sc_cat_item.no_order} in the sc_cat_item table as it would affect the stand alone catalog items as well. The alternative is to have a "variable set" that is set by the order guide and then cascade it to the catalog items and hide the button in "onLoad" script. This seems like a hack.

Thanks a lot,

-Ruchika

1 ACCEPTED SOLUTION

ruchika2
Mega Contributor

Thanks Suhas, I was able to modify "com.glideapp.servicecatalog_cat_item_guide_view" in order to remove the "submit" button.


View solution in original post

5 REPLIES 5

Hi Kalai,


The "Submit" and "Add to cart" buttons are showing up on the top right of the snapshot. I'm all set though, thanks.