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.

BLOG Edit the UI Action on “Actions on Selected Rows” for Particular Table

iftekharmir
Tera Contributor

 

While working on the Approvers tab of the sc_task table, you might have noticed the “Actions on selected rows” dropdown.
This feature allows you to perform bulk operations on selected approval records — such as approving, rejecting, or executing a custom action.

In my case, I wanted to hide "Request Approval" under “Actions on selected rows” for sc_task records, but still display it for all other records.

 

My Use Case

In my scenario:

  • For sc_task records → the "Request Approval" button should not appear.

  • For all other records → the "Request Approval" button should be visible as usual.


Steps I Followed

1. Navigate to the UI Action
Go to:
System Definition → UI Actions
and filter by Table = sysapproval_approver.

2. Identify the Target UI Action
Locate the specific UI Action that appears under the “Actions on selected rows” dropdown on the Approvers tab.

3. Add a Condition
In the Condition field of that UI Action, I added a simple one-line script:

 

 
current.state == 'not requested' && current.sysapproval.getRefRecord().getTableName()!= 'sc_task'

4. Save and Test
After saving, the button correctly displayed for all tables except sc_task — exactly as intended.


Result

This quick one-line condition worked perfectly.
The UI Action is now hidden only for sc_task records and remains visible for all others.

 

Table : sc_task

iftekharmir_0-1763043078836.png

 

For Table : sc_req_item 

iftekharmir_1-1763043249608.png

 

If you found it useful, please mark it as Helpful so others can benefit too.

Thanks and regards,

Iftekhar Mirza

0 REPLIES 0