I published recently open source code for setting approval process reminder alert. The code uses free app - Asynchronous Process Manager / Creator - to schedule its processing. In this post I will show alternative option for setting such alerts, without custom code, but only usage of the app.
Keep in mind:
1.The solution require few setup actions per each approval process
2.It provide less capabilities than the solution in the open source code, but should be enough for most use cases
What setup is needed?
Per each approval that we want to use will need:
- Date/time field that indicate how long record is pending for approval
- Checkbox formula that indicate if reminder should be send for the record
- In the approval process fields update that set/clear the date/time field
For the demo, I added approval process on opportunity therefore I created in opportunity:
-Custom date/time field: Approval Start Time
-Formula checkbox: Approval Send Reminder
The first part calculate the time passed since the Approval Start Time (in hours) and if it is greater than 48 then the formula will be evaluated to true
In my approval process I set 2 approval steps and use 2 fields update:
- Set Approval Start Time to Now
- Clear Approval Start Time
What is next?
Use the app to configure a process for sending the alerts.
- Before starting the next steps: go to Setup->Custom Metadata Types. Click Manage next to Module Standard Object Option, click edit next to record Async Template. In the Available Standard Objects add at the end 'ProcessInstance;ProcessInstanceStep;' and click Save. This settings will allow us to access those objects types in the next steps.
1.Go to tab Async Job Template and click New
2.Provide Name, set status to Live and click Save
3.Click the button Set Actions. This process will have 5 steps, so we can click Add Action button*5 and provide the action names + type
Data Source: Action
Action Source: Find Related Process Instance Steps
Object to Insert: Log Message
No comments:
Post a Comment