Add Adhoc approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2022 02:16 PM
Hi All,
We have a catalog item which has approval workflow built in. There are times when we need to ad hoc approval to the request. User is able to add an approval but the state does not change to "Requested", User has to manually change the state from Not yet requested to Requested.
Once the state is changed and the approval approves the request, the others should not have to approve.
Is there a way to change this behavior?
Thank you in advance.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2022 04:27 AM
Hi Navneet,
You can create a Business Rule on approval table. It should run when below conditions meet:
When: Before, Insert
Condition filter: State is 'Not yet requested'.
Script:
if(current.sysapproval.sys_class_name=='sc_req_item')
current.state = 'requested';
Please mark this as correct and helpful if it resolved the query or lead you in right direction.
Thanks,
Mohit Kaushik
Community Rising Star 2022
Mohit Kaushik
ServiceNow MVP (2023-2025)