Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Hide UI Action form button with UI ACTION VISIBILITY

Floridalife
Giga Expert

We want to hide the UPDATE and SAVE UI Action form button on the approval form

2016-03-07 16_56_12-ServiceNow.png

I added the approval view with EXCLUDE for the save button but that didnt work, when i set it to INCLUDE it hides it for all tables. its doing the opposite that it should or am i missing something?

2016-03-07 17_00_22-ServiceNow.png

1 ACCEPTED SOLUTION

marcelo_moreli
Mega Guru

The Approval form is not Approval view, the view used on the Approval form is the "Default" one.


If you want to hide it just on the approval form, do the same you did for the table "new_call", adding a condition to make sure the Table is not "sysapproval_approver" (... && current.getTableName() != 'sysapproval_approver').



Hope it helps!


View solution in original post

8 REPLIES 8

Did you modify the button or did you create a new one with this configuration?


Be careful changing the OOTB button Table, since you're basically saying this button should not be shown in any other table.


If you created a new button, with the same Action Name, then you're overriding the Global button, that is a perfect solution.


I made a new one with the same title to overwrite like you said, perfect, thanks again


Karan Sharma3
Tera Expert

You can add this onLoad client script.



function onLoad() {


    //Type appropriate comment here, and begin script below


    var items = $$('BUTTON').each(function(item){


          if(item.innerHTML == 'Save'){


                item.hide();


                return;


          }


    });


}


It works, but it's not recommended to use DOM; Makes a lot more difficult for future administrators to find out where the button is being hidden.