Disable Approve button under conditions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2025 10:17 AM
Dear community,
I'm developing a scoped application that creates some catalog items that can be then requested. When one of those items is requested, a custom flow opens an approval.
I would like to implement a preventive control when the approver click on the approval button. Basically, I want to check for any policy violations and in case violations are found, i want to cancel the approval.
How can I execute a query / script / webservice call when someone clicks on the Approve button and based on the result cancel or submit the approval ? I've seen UI Policies, but they are global.
Thanks for your kind answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2025 03:43 AM
Hi @Olivier Detille ,
Since the Approve button may be a UI Action, please write the required condition within the UI Action script.
I think this article will be helpful.
Solved: how to abort action in client UI Action? - ServiceNow Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 05:49 AM
Thanks, I'll investigate that solution. I'm not yet familiar with UI Action, but will show some tutorials about it.