After Rejected, Change Request State should be be 'Closed' not 'New'

Servicenow10
Kilo Guru

My requirement is that if at any approver rejects the Change Request, the state should become 'Closed' instead of 'New'. I tried it using workflow but not able to achieved.............

if an approver rejects the change request it should be closed with a comment because of approvers rejection it is closed 

1 ACCEPTED SOLUTION

Hi,

Here is how you can do this. I checked in my PDI and its working fine.

After reject notification, in your WF, add run script activity.

In run script, add the following code.

current.setWorkflow(false); //This will disable the BR that is restring the state move.
current.close_notes = "rejected";
current.close_code = "unsuccessful";
current.state = 3;

Connect Reject notification -> Run script -> End.

Mark the comment as a correct answer and also helpful once worked.

View solution in original post

21 REPLIES 21

I don't think this BR is affecting your feature.

I think you are tryig to move the CR to close state directly from Assess or from scheduled, which this BR is preventing.

In general the states of CR is as follows

New -> Assess->Authorize->Scheduled->Implement->Review->closed

Or

New -> Assess->Cancelled

If you try to move CR by skipping the between states, then you get the error.

Mark the comment as a correct answer and helpful if you find this helpful.

am not getting an error if i disabled this br but i want to print comments that because of appovers rejection am closing chg req....can you please help me to achieve this

 

thanks in advance!!

Hi,

Generally, as standard flow, when the change is rejected, the state should be cancelled and not Closed.

In the workflow,when the reject happens, you can set state to cancelled.. and you can also set work_notes field to static text and write something like this in the text box "Request is rejected. Hence moving to cancelled"

Mark the comment as a correct answer and helpful if this helps.

when i rejected the chg req it goes to new state

help me to achieve this

 

Share me your skype id or hangouts where we can connect and i can have a look at your instance and can fix it.