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
jwalshjwalsh 

Access PriorValue of trigger object in an Action in Process Builder

Hey all,

Anybody taking the Process Bulider for a walk yet?  (I've heard it called the Process Builder, Visual Workflows, etc).

I'm trying to do something I do a lot in code; drop some breadcrumb objects when an object moves between two states.  To do this, I link to the object changin and set a "From" and "To" filed value.  In apex, I do this in a before update trigger and grab the values from oldMap and newMap.

In the process bulider, I can access "Priorvalue" in a decision block.  During the "Create" action, however, I can't get at the old value; I only have access to select [Object].field, or to "hard code" the value I want to go into the field.

Anyone else out there trying to do something similar?
Best Answer chosen by jwalsh
Abhinav S.Abhinav S.
Till now, we are not having this option with processes like Flow triggers (Still a beta pilot program & having various limitations)

All Answers

Abhinav S.Abhinav S.
You can launch a trigger ready flow from a process for this purpose.
https://help.salesforce.com/apex/HTViewHelpDoc?id=process_action_flow.htm&language=en_US
jwalshjwalsh
Abhinav, do you know if Process can have access to {!this} and {!old}, like Flow Triggers do?
jwalshjwalsh
PS sorry for the bold font :P
Abhinav S.Abhinav S.
Till now, we are not having this option with processes like Flow triggers (Still a beta pilot program & having various limitations)
This was selected as the best answer
Abhinav S.Abhinav S.
@jwalsh : Please see above reply for more details and reply.
thinkdatathinkdata
sorry for the duplicate post, but the work around (until they incorporate functions into the mapping dialogue) is to create extra fields on your object to hold the previous value and then a formula to detect if the current value is different from the previous. then you can use the formula as an ischanged condition.  crude, but it gets the job done. after   you are done, include an activity  to push the current value into the previous value field.
Rashmi T 1Rashmi T 1
Yes we can access the prior values through flow trigger using the {!old} value to set the flow variables. But flow triggers are not available in the new organisations. The same cannot be achieved using process builder as process builder does not allow manual entries for fields of type references.