Process Builder Best Practice

Process Builder Best Practice

If this is your first-time hearing about Process Builder, then let me tell you that you are missing out on one of the powerful tools in Salesforce platform. Before Process Builder came to life most of the heavy automation processes would have been taken programming in the past, but lucky us now we have a powerful tool without the need to have knowledge about programming and all of that in an easy and simple interface.

But wait a minute! You may say, didn’t we have a tool for the automation process called Workflow?

Well yes! but Process Builder has some crossover with Workflow Rules but its capabilities can (and do) go beyond the scope of Workflows such as:

  • Creating a Record
  • Updating records other than the one which started the workflow
  • Initiating an Approval Process
  • Initiating a Flow
  • Initiating Apex
  • Firing off another Process Builder

Some cool features in Process Builder

ZERO HOUR SCHEDULED ACTION

Sometimes a Process Builder action needs to fire off a few minutes after it’s been evaluated to avoid conflicts with other Workflows or code.

Set the timing to 0 Hours After Created Date. You can choose other dates if it makes sense for your process, you should see your update or other action, such as an Email Alert, fire off within about 5 minutes. That tells us that the 0 Hour takes a bit of time to execute instead of Immediate execution. 

IS NULL OPERATOR

Let’s say that you need to make sure that a value in field is not blank, how would you achieve that? Process Builder offers us “IS NULL” operator which uses Type “Boolean” and you can set the value to true or false depending on what you need.

REFERENCES

What would you do if you had to set a value of a field update to the value of another field – or a field on another record? I think you know the answer by now “Process Builder” let you do that. This is particularly useful when you do not only want to set a static value.

Some Tips and bad practice you should avoid

1.     Create reusable actions/processes:

In order to save time and effort, it is recommended to create common actions/processes/activities like email send action, update record action, etc. in such a manner that it can be reused in multiple processes. 

2.     Avoid overlapping automation on one object:

As there are multiple automation tools available like workflow, process builder and others while creating a new process you must ensure that there is no other automation running on this object.

3.     Look out for infinite loops:

When you are dealing with multiple processes, you should stay careful with infinite loops as 2 independent processes may get into an infinite loop and trigger your org limits.

4.     A single process for 1 object:

It is better to combine the record change processes on an object in a single master process rather than having it split over multiple ones as a combined process helps you to determine the results accurately.

EX. If there are multiple processes running on the same field, the order in which they update the field may lead to the success/failure of other processes running on that field.

5.     Using Stop:

If you have a process builder that does some action or update a record but you want to make sure that if it did some action it will not update a record, use Stop instead of evaluating to next criteria to ensure it.

6.     Ensure Field level security:

For best practice, you should make sure that the user how would use the process builder has the right permission set on some fields because otherwise it will not execute and will throw an error.

EX. Account.Country == “UK” and the user does not have access to Country field it will throw an error 

要查看或添加评论,请登录

Ahmed Lotfi Alqnatri的更多文章

社区洞察

其他会员也浏览了