- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Good evening.!
How to edit this UI action button "Request approval" on sc_task table, under Approvers tab?
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.)
@Ankur Bawiskar @Dr Atul G- LNG @Viraj Hudlikar
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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:
Ui action:
Result:
sc_req_item table:
sc_task table:
Regards,
Teja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Yeah @Ankur Bawiskar ., still it is not working. Please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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:
Ui action:
Result:
sc_req_item table:
sc_task table:
Regards,
Teja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
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.
