You need to sign in to do that
Don't have an account?
Bhavana
send reminder email to pending current approver
Hi
Can you please help using batch apex to send approval reminder email to pending approver on Opportunity. I have an approval process setup with few related users as approvers, but to send the reminder email, time-based workflow process won't help as it needs to pick current pending approver name. Is there a way to capture the pending approver name in custom field and use it in workflow to send email alert? Or, can we have a batch class for this?
I have found below query to get the current pending approver name. Please let me know how to use it in batch apex to send reminder email after 48 hours of submitting for approval.
SELECT CompletedDate, ElapsedTimeInDays, ElapsedTimeInHours, ElapsedTimeInMinutes, Id, ProcessDefinitionId, Status, SubmittedById, TargetObjectId FROM ProcessInstance WHERE TargetObjectId = 'aaaaaaaa' And Status ='Pending'
SELECT ActorId,Comments,CreatedById,CreatedDate, ElapsedTimeInDays, ElapsedTimeInHours, ElapsedTimeInMinutes,Id, OriginalActorId, ProcessInstanceId, StepNodeId,StepStatus, SystemModstamp FROM ProcessInstanceStep where ProcessInstanceId='bbbbbbb'
Thanks.
Can you please help using batch apex to send approval reminder email to pending approver on Opportunity. I have an approval process setup with few related users as approvers, but to send the reminder email, time-based workflow process won't help as it needs to pick current pending approver name. Is there a way to capture the pending approver name in custom field and use it in workflow to send email alert? Or, can we have a batch class for this?
I have found below query to get the current pending approver name. Please let me know how to use it in batch apex to send reminder email after 48 hours of submitting for approval.
SELECT CompletedDate, ElapsedTimeInDays, ElapsedTimeInHours, ElapsedTimeInMinutes, Id, ProcessDefinitionId, Status, SubmittedById, TargetObjectId FROM ProcessInstance WHERE TargetObjectId = 'aaaaaaaa' And Status ='Pending'
SELECT ActorId,Comments,CreatedById,CreatedDate, ElapsedTimeInDays, ElapsedTimeInHours, ElapsedTimeInMinutes,Id, OriginalActorId, ProcessInstanceId, StepNodeId,StepStatus, SystemModstamp FROM ProcessInstanceStep where ProcessInstanceId='bbbbbbb'
Thanks.
Rahul Jain 169