Process Builder Record Update action can produce unexpected results when filtered on certain ID fields
Last updated 2017-04-14 ·Reference W-3241359 ·Reported By 2 users
Summary
In Process Builder User Interface, we add an implicit filter to the underlying Flow Record Update action to fetch the relevant record to update.
eg. If the Record Update action updates the triggering Account record ( [Account] ), we add an implicit filter: [Account].Id Equals myCurrentVariable.Id
The Flow filter engine converts 2 or more filters with the same left hand side and the equals operator to an OR comparison
Thus if another filter is added to the action based on the same Id field (like [Account].Id Equals <somehardcodedId>) the result would be an update to both records based on the OR logic.
NOTE: This behavior has been partially addressed by hiding Id as an available field for filtering record updates. However, it has been discovered that this prevents selection of Id in some scenarios where that selection would be valid, and that the fix does not address certain scenarios (specifically when a Process Record Update is updating child records). This is under review.
Repro
** NOTE: This repro scenario is no longer possible as of Summer '16 **
1. Create a Process on Account (for example).
- Can run on Create or Create and edit; Doesn't matter
- Criteria can be anything (or nothing); Doesn't matter
2. Add an "Update Records" action.
a) Select "Select the Account record that started your process"
b) Select "Updated records meet all conditions"
c) Add a condition based on "Id", like "Account Id equals <some 18 character Account Record Id>"
d) Set the action to update some Account field.
3. Trigger the Process. Note that this causes an update to both the Account where the Process was triggered AND the account given in the filter added in 2c above.
Workaround
a) avoid adding filter conditions to a Process Builder Record Update based on the same Id field which the update itself is based on.
b) If trying to update child records and filter that record update by Id (currently not an option due to the partial fix already implemented for this issue), use a Flow to perform the desired record update action.
Reported By (2)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.