You need to sign in to do that
Don't have an account?
Email Approval
Auto approval comment in email
I have written apex class to auto approve step(except last and first step) of approval process if it is pending for more than 2 days, and I have scheduled that that apex class that runs every day and it is working fine.
Now if it got auto approved the next approval get an email that approval is pending for you. I am sending the email from approval process step only. I am setting comment of auto approval from code, comment like 'The previous step was auto approved'.
I need this comment to sent to next approval email? how to achieve
Now if it got auto approved the next approval get an email that approval is pending for you. I am sending the email from approval process step only. I am setting comment of auto approval from code, comment like 'The previous step was auto approved'.
I need this comment to sent to next approval email? how to achieve
In your controller code; use below query to get the access to the last step in the approval pocess. relatedObjectId should be passed from the VF email template-->VF component-->controller. Then iterate over the list you get (basically only one record in the list) and access comments field and pass it to the VF component and then email template.
Hope this helps.