cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Triggering a flow when a Salesforce object is updated

I am struggling to create a flow when I edit an Account in Salesforce. I want to trigger a flow whenever a 'checkbox' field in Account object is set to Yes (checked) and another field is blank. I have no knowledge of the format used in OData filter and OData query and have already spent several hours trying to get this to work but no luck so far.

 

Any help will be greatly appreciated!

 

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Triggering a flow when a Salesforce object is updated

Hi @KMLNN,

 

I think there is something wrong with your formula within Condition box, please take a try with the following formula within your Condition box:

@and(equals(triggerBody()?['Create_x0020_Numex_x0020_Site__c'], 'Yes'),empty(triggerBody()?['Numex_x0020_ID__c']))

 

Please take a try with the above formula and check if the issue is solved.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Triggering a flow when a Salesforce object is updated

Hi @KMLNN,

 

Could you please show a bit more about the “Checkbox” field and another field?

Further, could you please share a screenshot of your flow’s configuration?

 

There is no way to check if a field is empty within Filter Query field of “When a record is modified” action of Salesforce connector in Microsoft Flow currently, so I afraid that there is no way to achieve your needs within Filter Query field of “When a record is modified” action.

 

You could consider take a try to add a Condition to achieve your needs:

  • Add a “When a record is modified” trigger.
  • Add a Condition, click ‘Edit in advanced mode”, type the following formula:

 

@and(equals(triggerBody()?['Active__c'], 'Yes'),empty(triggerBody()?['NumberofLocations__c']))

 

  • Within “If/yes” branch of Condition, add “Send me an email notification” action.

Image reference:5.JPG

The flow works successfully as below:6.JPG

Please check and see if the following article would help you understand the usage of OData query:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/SQL-OData-UTC-Now/m-p/71005/highlight/tr...

 

More details about OData Query in Salesforce, please check the following article:

https://help.salesforce.com/articleView?id=odata_query_string_options.htm&language=en_US&r=https%3A%...

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate I
Advocate I

Re: Triggering a flow when a Salesforce object is updated

 

Screen Shot 2017-12-19 at 13.27.21.pngHello, thanks for the reply. The fields that I have in Salesforce are marked in the attached screenshot.

 

I also tried the formula you provided, replaced your variables with the ones that I wanted to use, but my expression is being evaluated to 'false' and therefore the required steps are not working.

Screen Shot 2017-12-19 at 13.43.56.png

 

 

Highlighted
Advocate I
Advocate I

Re: Triggering a flow when a Salesforce object is updated

Hi, any thoughts?

Highlighted
Community Support
Community Support

Re: Triggering a flow when a Salesforce object is updated

Hi @KMLNN,

 

I think there is something wrong with your formula within Condition box, please take a try with the following formula within your Condition box:

@and(equals(triggerBody()?['Create_x0020_Numex_x0020_Site__c'], 'Yes'),empty(triggerBody()?['Numex_x0020_ID__c']))

 

Please take a try with the above formula and check if the issue is solved.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (7,411)