How to Restrict Approvers not to approve the RITM until approver fills mandatory variables in RITM level in service catalog?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2018 06:54 AM
Hi community,
I have one catalog item, made some variables not visible to the end user but the same variables enabled mandatory in RITM level using catalog UI policy (make "Applies only on Requested items" check box to true).
I have two Groups of Approvers in my workflow in RITM, One group of users can approve the request without filling the mandatory fields,but when coming to second group of approvers, they should fill those mandatory fields before approving.But here the problem is, without filling the mandatory fields also they are able to approve it.
I want ,when second level of approver group tries to approve (without filling mandatory fields), they can not be able to approve the RITM and should get warning message that "Before approve the Request,please fill mandatory fields in RITM"
Very much appreciated, if any one coulg help me on achieving this requirement.Its very urgent.
Regards,
Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2018 07:20 AM
Hi,
You can update THE UI action for approve button by writing client script in it to verify if the user belongs to group B, then throw a validation error by checking all the mandatory field values and if not, let them approve the request.
You can take reference from below link for writing client-side code in UI action.
https://www.servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/
Please mark it correct/helpful based on the response.
Thanks
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2018 07:40 AM
Hi Gaurav,
Thanks for your reply.
Already we have an OOB Approve UI action is there on Approver table to approve the request. If i create again,this will applies to all the catalog items.
I am expecting this requirement only on one catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2018 07:43 AM
Hi,
Write a before BR on approver table and check if those values filled or not. If not abort the action and throw an error message stating the same to fill the values.
In the before BR check for the Catalog Item and the process the next steps accordingly
Regards,
Ram M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2018 08:16 AM
Hi Ram,
Thanks for your reply,
But how can i query and search for the variables on RITM whether empty or not?
Kindly please share any sample code you have.