How to generate approval for manager if approver doesnot approve it in 2 days?

sarfraz3
Mega Expert

Hi All,

I have a situation in which if an approver is not approving/rejecting   the request an escalation email goes to his/her manager in 2 days. That works fine through scheduled jobs.

Now I also want to add the manager to approver to approval list at the same time. and when any one of the approver approves the request should get approved. Please help me with the approach...is it approval rules I should use?...is it something else?.

1 ACCEPTED SOLUTION

larstange
Mega Sage

Hi



The function you are trying to use does not exist on a glide record. It exist in the WorkflowApprovalUtils script include.


This script include is used by the workflow Approval activity.



You cannot add additional approvers outside the workflow, as the workflow activity will not be aware of them, so when they approve or reject, nothing will happen in the workflow.



You can implemented the changes I have suggested in the workflow and it will work for future requests, but not for the current onces.


You could consider adding the manager as a delegate to the approver to allow them to approve the current items.


View solution in original post

8 REPLIES 8

Thanks Lars,



So we don't have any option other than workflow?.... because to add into workflow I have to dig in to hundreds of item separately.. that is not feasible I guess... well thanks for your suggestion.. I will mark this helpful ...


Just one more query!... Can I add delegate through script because manager has to get the approval only when the approver does not approve for 2 days ....so I have to first check the condition if it is updated before more than 2 days and set the delegate....do we have any method for that....   IF YES, then will the manager get approval as we are delegating him after the request is created!   ??


larstange
Mega Sage

Yes you can add a delegate via a script - just create an appropriate record in the sys_user_delegate tabel.


If you have a homepage / ess / service portal displaying the users pending approvals they will show here.



They will not get an email, but you could make a special notification for this and trigger it via an event, in the script where you generate the delegate records


Fanny Jonasson
Tera Contributor

Hi, 

 

I have a customer with the same requirement, did you find any solution? 

 

Best regards 

 

Fanny