Pages

Friday, January 12, 2018

Salesforce: Update Records criteria in Process Builder

Until Spring '18 release, in Update Record action, if we have multiple conditions, we can't customize the logic for the condition with AND, OR. Feel free to vote my idea Process Builder - filter logic in Updating Records action.

no option to define logic


While in Define Criteria, the option to customize logic is available since long time back.



If we drill down further, for the condition in Record Update, by default the relation for each condition is AND, however, if we define more than 1 condition using the same field, the relation of the conditions for the same field would be OR, here an example:


From above sample, we define Account Source twice, and Support Level twice, the logic for this can be translated as (1 OR 2) AND (3 OR 4).

Here quote from Salesforce documentation Update Records from a Process.
When you define multiple filters, the filter logic usually defaults to AND. However, if multiple filters have the same field selected and use the equals operator, the filters are combined with OR. For example, your filters check whether a case’s Type equals Problem (1), Type equals Feature Request (2), and Escalated equals true (3). At runtime, those filters are combined to (1 OR 2) AND 3.


ReferenceUpdate Records from a Process