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.

I want to remove the Order Now button and Bundle from the specific catalog request

AbdulrehmanT
Kilo Guru

Hey,
1 - Can anyone let me know or provide me the solution that how I can remove the OrderNow/ Submit/ Request button and Bundle button from the specific catalog item, 
2 - Also, I want to add a note directing Requestors to check out from the Cart
Please take a look at the attached images below.
Thanks in advance😊

8 REPLIES 8

Hi Ankur,
Hope you are doing well. Did you get a solution that how i can hide the order now button on the item, curently we can go into the cart and from there we can checkout the item, so order now button is making people confused. If you have any solution, please provide it to me, thanks in advance

MaxMixali
Kilo Sage

Hello i hope that can help

The issue with accessing previous values in Flow Designer script actions called from Business Rules is a common challenge. Here are solutions to help you pass and access previous values:Solution 1: Pass Previous Values as Flow InputsIn your Business Rule, explicitly pass the previous values as input variables to the flow:Business Rule (Before/After Update):
javascript(function executeRule(current, previous /*null when async*/) {

// Store previous values in an object
var previousValues = {
state: previous.state.toString(),
assigned_to: previous.assigned_to.toString(),
priority: previous.priority.toString()
// Add other fields you need
};

// Trigger the flow with both current and previous values
var inputs = {
current_record: current.getUniqueValue(),
table_name: current.getTableName(),
previous_state: previousValues.state,
previous_assigned_to: previousValues.assigned_to,
previous_priority: previousValues.priority
};

sn_fd.FlowAPI.getRunner().trigger('your_flow_sys_id', inputs);

})(current, previous);Then in your Flow Designer script action, access these as input variables:
javascriptinputs.previous_state
inputs.previous_assigned_to

If you find this answer useful, please mark it as solution accepted/helpful

Massimiliano Micali

 

Hi Max,
Hope you are doing well. Did you get a solution that how i can hide the order now button on the item, curently we can go into the cart and from there we can checkout the item, so order now button is making people confused. If you have any solution, please provide it to me, thanks in advance

AbdulrehmanT
Kilo Guru

I found out the solution☠️

In the catalog items, there's a checkbox "No order now"; set that to true for your catalog item

Also set the checkbox for "Use cart layout" as false

AbdulrehmanT_0-1763755214396.png

But now there's one requirement remainning to remove the 'save as bundle button' on the view cart page in service portal for some catalog items