Salesforce Process Builder Quick Start Guide
上QQ阅读APP看书,第一时间看更新

An overview of Process Builder

Lightning Process Builder and Process Builder are the same tool. Process Builder provides a way to automate business processes. In other words, it is the upgraded version of the Workflow Rule. Whenever you create a process, the system automatically creates a Flow, and a Flow Trigger to call the Flow. This happens behind the scenes, and the user doesn't need to interact with the shadow Flows. The Workflow Rule has several limitations. It doesn't allow you to update child records. Also, it doesn't allow you to post to Chatter, create a child record on a specific action, or automatically submit a record for approval.

To overcome these limitations, Salesforce introduced Process Builder in its Spring 2015 release. There are a few advantages to Process Builder, which are as follows:

  • It allows you to create a complete process on a single screen, unlike in Workflow Rules, where you have to move from screen to screen to create a complete rule.
  • Its visual layouts allow you to create a complete process using point-and-click.
  • It helps you to minimize Apex code usage.
  • It allows you to call Apex from Process Builder, where Apex is still required.
  • It also allows you to create multiple scheduled actions for the criteria from Process Builder.
  • You can easily reorder process criteria with drag and drop.
  • It is also possible to execute multiple criteria of a process.

As of the Summer 2018 release, Process Builder runs in system mode, so object- and field-level permissions will be ignored for the user that triggers the process. Visual Workflow runs in user mode, which means that at runtime, the user that triggers the Flow, their access on the object, and field the level will be counted. However, if a process is launching a Flow, the whole automation will run in system mode. Let's look at an example; suppose that you are trying to update the opportunity Next Step field:

  1. If you are using Process Builder: If the running user doesn't have access to the Next Step field, Process Builder will be able to update it.
  2. If you are using Flow (a custom button to call a Flow): If the running user doesn't have access to the Next Step field, they will get an error.
  3. If you are using Flow to achieve the same thing, and you are using Process Builder to auto-launch the Flow: If the running user doesn't have access to the Next Step field, then the Flow will be able to update it.

If any of the actions fail at runtime, the entire transaction will fail, and an error message will be displayed. There are some exceptions to this and settings to work around it, which we will discuss in Chapter 2, Deploying, Distributing and Debugging your Process