How to edit the UI action on "Actions on selected rows" on sc_task table, under Approvers tab?

AbdurRahmanSnow
Giga Guru

Good evening.!
How to edit this UI action button "Request approval" on sc_task table, under Approvers tab?

AbdurRahmanSnow_0-1762793297346.png

I want to either edit it to write a script or, remove it? Please help. (Also, please ignore the other "Request Approval" button on the context menu. That is a custom button.)

AbdurRahmanSnow_1-1762793471698.png

@Ankur Bawiskar @Dr Atul G- LNG @Viraj Hudlikar 

1 ACCEPTED SOLUTION

tejarekanda
Tera Expert

I think, We can’t hide a UI Action from the list Choice (like on sc_task) using a condition 

However, we can disable the functionality of that UI Action instead.

I handled this by creating a Script Include to check the table name and then used it in the UI Action’s condition.
Script Include:

tejarekanda_0-1763040120067.png

 

Ui action:

tejarekanda_1-1763040169378.png

Result:
sc_req_item table:

tejarekanda_2-1763040241586.png


sc_task table:

tejarekanda_3-1763040299977.png

Regards,
Teja

View solution in original post

19 REPLIES 19

Yeah @Ankur Bawiskar ., still it is not working. Please help.

@AbdurRahmanSnow 

try this

1) In existing UI action add this extra condition I highlighted in bold

current.state == 'not requested' && RP.isRelatedList() && parent.getTableName() != 'sc_task'

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@AbdurRahmanSnow 
Thank you for marking my response as helpful.
As per new community feature you can mark multiple responses as correct.

💡 If my response helped, please mark it as correct as well so that this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

tejarekanda
Tera Expert

I think, We can’t hide a UI Action from the list Choice (like on sc_task) using a condition 

However, we can disable the functionality of that UI Action instead.

I handled this by creating a Script Include to check the table name and then used it in the UI Action’s condition.
Script Include:

tejarekanda_0-1763040120067.png

 

Ui action:

tejarekanda_1-1763040169378.png

Result:
sc_req_item table:

tejarekanda_2-1763040241586.png


sc_task table:

tejarekanda_3-1763040299977.png

Regards,
Teja

Hi @tejarekanda .
Thank you so much. This script include worked and the button got greyed-out on SCTASK.
Really appreciate your help. You saved my day.