cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jballard
Level: Power Up

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
Super User
Super User

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
Super User
Super User

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

jballard
Level: Power Up

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.

Super User
Super User

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 Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 70 members 3,540 guests
Please welcome our newest community members: