cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Comparing Before and After Values in Salesforce

If I am using the connector to Salesforce, and my trigger is when a record is modified, is there a way to tell what the original value of a certain field was, and its new value? Or limit the trigger to when a certain field is changed?

 

Example: if my Salesforce object has a status field, and that object is updated and the status changes from anything to "Paid," I want it to execute. Any other time the record is updated, I don't want the flow to execute. I figure the only way to do this is if I know the original value of status and the new value.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Comparing Before and After Values in Salesforce

Hi @jballard 

 

The action "When a record is modified" will not get you the previous value of the field from the record. It triggers when the record was updated and there is no way you can get the value before the record was modified (as the flow is triggering upon the record change). 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

3 REPLIES 3
Highlighted
Dual Super User III
Dual Super User III

Re: Comparing Before and After Values in Salesforce

Hi @jballard 

 

The action "When a record is modified" will not get you the previous value of the field from the record. It triggers when the record was updated and there is no way you can get the value before the record was modified (as the flow is triggering upon the record change). 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
New Member

Re: Comparing Before and After Values in Salesforce

Thanks. It would be nice if there were a way to compare before and after values, but I think we can work around it by setting a flag in the source system and having Flow evaluate that field. If the flag is true, Flow will continue, and if not, then have it stop.

Highlighted
Dual Super User III
Dual Super User III

Re: Comparing Before and After Values in Salesforce

@jballard 

 

yes. That is a work around that can be used. You can also look at the modfied date time field for this. Also, we should see some updates in the connectors/ actions/ triggers as the Flow team is working on bringing ideas posted here : 

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas. You might want to post one for this requirement if there is not one already posted there. 

 

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (8,386)