[SalesForce] How does the advanced process builder option “Only when specified changes are made” calculate

Currently doing some additional research for a process builder issue I was having a while ago, so I don't have the specific example here unfortunately.

The issue was due to the advanced process builder option "execute the actions only when specified changes are made" and not working exactly as expected. Solved the issue by putting an "object created" checkbox on the record that gets checked in the actions of the node and including criteria that the checkbox is unchecked.

But, just want to see if anyone knows more about how this option works.

All the documentation I can find is simply re-stating the help text: When you select yes, the actions are executed only if the record meets the criteria now but the values that the record had immediately before it was saved didn't meet criteria. This means that these actions won't be executed when irrelevant changes are made.

My question is if anyone knows how this before/now is evaluated. My best guess is that it's running the criteria through the "Trigger.Old" record and requiring that it was false entering in and true in the "Trigger.New" record.

Mostly just asking to satisfy my curiosity. Anyone have other thoughts on this?

Best Answer

This works exactly like the Trigger.old vs Trigger.new principle. When a field has a different value before the update vs. after the update in a specified field, only then the process will execute. When it's a new record, obviously there are no values for the old version (there's no old version at all), so any value in the field would be considered a change, and invoke the process actions.

Related Topic