Change Request Record Producer - Request Approval?

Community Alums
Not applicable

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

 

 

2 REPLIES 2

Community Alums
Not applicable

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 -

 

change_error.PNG

MattSN
Mega Sage
Mega Sage

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...