- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2019 08:29 PM
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
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2019 04:45 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2019 04:45 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2019 09:57 PM
Hi,
Could you also mark this comment as a correct answer and helpful so that the question is moved to the solved list.