Approvers are deleted automatically by system itself

shruti_shah
Kilo Explorer

As per our business requirement , when a request is raised for application/applications access, it goes for first level approval to caller's manager. When the first level approval is done, it goes to the second level approval to the respective application's owner.

Now there are approval groups formed for each application and there are members in each approval group. The issue is that when the first level approval is done by manager, the approvers get deleted for few applications by system itself. Kindly note the whole approver group gets deleted.

Can anyone help why the system is deleting approval group(approvers) automatically by itself??

12 REPLIES 12

@Roger Poore 

Sure, thanks for asking!

It is as you suspected - the code runs in a Script Action right after the Approval Step (connected to the "Approved" Terminal).

Let us know about the outcome!

Best
Daniel


If this post was helpful, I would appreciate if you marked it as such - thanks!

Best
Daniel

I added the code to the script right after it decides that another approval is needed and it worked!   Thank you.

I can think of no good reason that SN should remove an approver to whom my code decided to send an approval request.    If this is a work around ("the system wants to make sure that only one user approval is open at the time"), its a distressing one.  Of course, I'm just a newbie to SN.

Can you advise what changes are needed to apply this to the group approval activity?

@Jeff137  Did you figure this out? We are getting same issue for group approvals & using same script doesn't help there.

Alright, figured it out. If anyone is wondering about the same, we need to run similar script for sysapproval_group table. Here is the tested script:

 

 

var grGA = new GlideRecord('sysapproval_group');
grGA.addEncodedQuery('wf_activity!=NULL^parent=' + sysid_current );
grGA.query();
while (grGA.next())
{
  grGA.setValue('wf_activity','');
  grGA.update();
}