Approval Process Reminders (Without Code)

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:

  1. Date/time field that indicate how long record is pending for approval
  2. Checkbox formula that indicate if reminder should be send for the record
  3. 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


Now lets fill the detail for each step:

Step1- find opportunities record based on the new checkbox field. We should retrieve all
opportunities were Approval Send Reminder is true.
Click button Set Action Params next to the first step, select Related Object as Opportunity,
click + icon to add filter and compare the Approval Send Reminder equal to true (checked)
Click button Close

Step 2 - search Process Instance related to the opportunities.
Click button Set Action Params next to the second step. Select the Related Object as Process
Instance, add filter, select the field Target Object Id equal, click the green filter icon,
choose filter by Find Opportunities for Alert and select the Opportunity Id


Step 3 - select the Related Object as Process Instance Step, add filter Process
Instance Id equal, click the green filter icon , select Filter By Find Related Process
Instance and select the field Process Instance Id

Step 4 - we will create Log Message records in order to send an alerts, which is part of
the package functionalities.
Fill the input
Data Source: Action
Action Source: Find Related Process Instance Steps
Object to Insert: Log Message

In the Field Setup section, select the following fields and set their values as follow:



Last step simply update the opportunity Approval Start Time to now, in order to reset the
counter.

Click Save button above the action list.


Now lets schedule the process.
Click button Create Async Job
Potentially- provide email to get summary email when the process complete
Set Time to Run
Check the Is Repeated Option
Repeated Type: Minutes
Repeated Interval: [Minutes per your needs]

Click Next



Video for the configuration of the Async Job Template:



Tip. If you would like to use email template for the alert, just modify the forth step in the
Async Job Template. Instead of setting the fields Subject and Message Email set the following
fields (Email Template Id should be your email template Id):








Using Custom Milestone Process in Salesforce


I formerly worked for a company that had a complicated, multi-steps approval process. One of the issues was that the process would frequently come to a halt at some point, and the approver would postpone their approval for days, if not weeks. The causes for the delay can vary, but the solution we implemented was pretty straightforward: we establish deadlines for each stage of the approval process, warn the approver several hours beforehand with email reminder, and if he does not approve, send him and his direct manager another reminder.

Amazingly, the alerts has dramatically reduced the approval times.

It appears that we frequently need due dates and phases in our process (breaking a complex task into steps, sounds familiar?), and occasionally we need enforcement actions to remind us of our tasks. The milestone concept and their functionalities include all of this.


The application Customized Timeline Process was designed exactly for that kind of tasks. Building processes per the organization need with few button clicks.

The application support setting milestone steps for any data type in the system (standard/custom) as well as automation actions for enforcing the times. In addition, the app provides reports to analyze the results and identify where there is room for improved performance.

As an example lets look at a milestone process on the Account.

I set first step as: Set Required fields, which as the name indicate it require to fill some essentials data on the account.
Per the configuration the user should fill the fields Rating, Industry and Website in order to complete this step and it should be done within 1 day.



In addition, I set an alert 
action to be sent to the account manager 1 hour before the due date.


Continue with step 2: Create First Opportunity 
(expected to be done within 3 days)

And later Step 3 and 4: Schedule a Demo Meeting and Close the Opportunity, will eventually the result with the following configuration:


After activating the process, any time new account will be created the application will automatically generate its related steps, automatically complete each step and execute the relate actions, as can be seen in the short video







Salesforce Time Logger



I saw similar question is some cases - we want to allow the user to report working hours directly in Salesforce.

Each implementation usually has unique specification, so I will share here the basic concept that can be used as basic and then customized/extended.


General idea is a custom component where user can report their hours + and optional component for manager to assign users with total hours they allowed to report. 

Therefore, it can be use in either way:

  • Placing Time Log component in record page and setting the property 'use assignment' to false,  allowing users to report hours on the record without limitation.
  • Placing Time Log component in the record page + Time Log Assignment (expose it for relevant users) and set 'use assignment' to true. This way, users can report hours only if they were assigned to.


Notice, we can add in the object Time Log lookup field for the object you want to links the reported hours and this will automatically populated. This way can use the standard components to display logs related list.

in the record page, without the lookup field only the the field Related_Record_Id will be set which is just an text field.


Rollups?

Common request with such functionality is to have rollup from the time logs to the parent object. For such request will need to set the lookup field in Time Log as suggest above.

Might consider the following points:

-In case it will be used only for 1 object, can simply set the relation to the object as master/detail and use build-in rollup summary fields.

-In case it will be used for few objects and there are several rollups needed might replicate the Time Log object per each case (Time Log Opportunity, Time Log Case...) and still use the mater/detail relation and the rollup fields.

-In other cases, were we ending with the lookup relation field, will need to handle the rollup calculations with customization.


Full code can be found in git:

https://github.com/liron50/shared-code/tree/main/timelog

Retire of Permission on Profiles

If you are working as a Salesforce admin/developer you've probably heard somewhere that Salesforce is planning to make a significant cha...