Approval is getting cancelled after rejecting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2019 11:41 PM
After rejecting the approval the "sysapproval_approver", request is getting cancelled instead Rejecting.
i have set run script activity in the workflow if the approval is rejected.
var c_task = new GlideRecord('sysapproval_approver');
c_task.addQuery('approver', current.sys_id);
c_task.query();
c_task.state="rejected";
c_task.update();
correct the script if am wrong any where?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2019 11:45 PM
Hi,
Is the current Approval record getting cancelled which was rejected or the other approval records for the same RITM or table?
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2019 11:49 PM
according to the workflow, only one approval is triggering.
i that user rejects the approval, the approval is setting as cancelled instead of rejecting.
so i have created runscript activity which will set the state of the sysapproval_approver to reject after rejecting.
but it is not happening.
and when you look in to the activities tab, it was rejected and then went to cancelled

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2019 12:55 AM
Hi,
It seems there is another Business rule that runs after update which changes the State for Approval table. Look for Business rules on Approval table that updates the state.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.