Change Request Record Producer - Request Approval?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 03:43 AM
Hi everyone,
I have a Change Request record producer to allow people to submit changes via the portal.
This is all working great, it creates a change record and sets various values using script/map to field.
However, what I would also like to happen is that the change gets sent for approval once submitted via the Portal?
When the change comes in it sits in the Planning stage, and we have to manually click 'Request Approval' for the workflow to kick in and add the approvers.
Is there anyway to achieve this?
Thanks!
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 04:12 AM
When I attempt to use the below in the Generated Record Data -
current.state = 'Open';
current.approval= 'requested';
It does not create a record and shows this on the portal when submitting -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 04:15 AM
In your record producer script you can set the values on the CR to move it to the approval stage.
//sample script additions
current.state = -4;
current.work_notes = 'Submitted via Portal';
Have a look at your Request Approval UI action to get the full details. Also see - https://docs.servicenow.com/en-US/bundle/tokyo-servicenow-platform/page/product/service-catalog-mana...