
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2019 10:10 PM
I have tried this script in onload client script but controller is not entering in this script :
this script is not working.
var items = $$('BUTTON').each(function(item){
alert("Step -1");
if(item.innerHTML.indexOf('Update') > -1){
alert("step -2");
item.hide();
}
});
How to solve please any one can tell me .
Thanks
Sanjay Bagri
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2019 05:12 AM
Yes i got it solutions for hide the button for specific table
in ui action conditions i have written below condition only
current.getTableName == ('table name')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2019 11:12 PM
Hi,
So you don't want this Update button on this table right?
If yes follow below steps:
1) Go to UI Action's
2) Open Update button which is on Global Table
3) Change table to your table on which you have to hide this button and then click insert and stay.
4) Then deactivate this new button. So you won't be able to see Update button any more.
Note: This is just to hide button on table and not based on conditions.
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2019 11:34 PM
Hi Ashutosh,
your approach is not working .is there any other way by script.
Can you tell me please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2019 11:16 PM
Hi Sanjay,
So you don't want users to update the record so better approach would be have a write ACL and give roles for whom records can be edited.
Because you don't want users to update the record better to make fields readonly as well
if acl evaluates to true update button would be shown if acl evaluates to false then update button would be hidden
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2019 05:12 AM
Yes i got it solutions for hide the button for specific table
in ui action conditions i have written below condition only
current.getTableName == ('table name')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 01:56 AM
Hi @Sanjay Bagri1
Where exactly you have written this condition and how it works in hiding the button "update" button for specific table