function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TheDeckbladTheDeckblad 

Process Builder: Best way to capture "ISCHANGED" criteria with $User at the same time

I'm trying to approximate the following criteria:

"Return true if a custom field on the current user is checked and a custom field on the object has changed to a certain value."

If I use filter criteria, I don't see a way to reference the running user.

If I use formula criteria, I don't see a way to use ISCHANGED() functionality.

How can I best encapsulate this criteria using a process?

CyberJusCyberJus
The process builder does not support the ISCHANGED formula. Here is an idea on the Ideaexchange
https://success.salesforce.com/ideaView?id=08730000000DgM9AAK

You could use a workflow to set a value on your object behind the scenes, and then fire the process off that value being set. It seems kind of silly, but it would get there. 
K_McRaeK_McRae
If I have understood your issue properly, I believe that you can do this in the process builder.

CyberJus is correct in saying that ISCHANGED is not supported by a Process Builder formula, but you can use filter conditions instead.

User-added image

Filter conditions 1 and 2 both refer to a picklist field called Status__c, first to see if the field has changed and secondly to see if it equals a specific value.

Filter condition 3 looks at the Last Modified By Id and then down the object heirarchy to find the custom field on the User object. In this case the custom field needs to have a value of Yes.
TheDeckbladTheDeckblad
That seems like it may be effective. I worry that LastModifiedId isn't update till after the processes have been run. Thus, it may refer to the previous user to modify a record? Can you speak to that?
K_McRaeK_McRae
My understanding is that when processes are executed the record is saved to the database, but the commit hasn't yet been executed.
As detailed in Triggers and Order of Execution (https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_order_of_execution.htm).
I tested the above example and it worked for me.
K_McRaeK_McRae
Looks like Summer '15 will add support for ISCHANGED in formulas in the Process Builder:
Compare and Return Values in Formulas (http://docs.releasenotes.salesforce.com/en-us/summer15/release-notes/rn_forcecom_process_formula_functions.htm?edition=&impact=)