web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Power Automate Flow How to handle Empty Lookup Fields in Dynamics 365

Michael Ghebremedin Profile Picture Michael Ghebremedin 107
I have seen a lot of complicated Power Automate Flows to handle Empty Lookup Values when trying to Update records.
As you know setting a lookup field with empty value is going to cause the Power Automate Flow to error out.
Example:
Setting Lookup =  accounts()
We are going to work with a scenario where we are going to retrieve Parent Account field value and populate it on another Account.
To handle this issue, we are going to declare a variable that hold the Lookup Value (String)
  

Then we are going to analyze if the source record has Parent Account populated or not

If the Parent Account has Value then we are going to set the variable with accounts(ParentAccount)

 

Otherwise we are going to set the value to null
 

The last thing to do here is to populate the field on your Update 



This is going to save us time on our Power Automate Flow development and keep the flow clean and concise at the same time.

 
 









This was originally posted here.

Comments

*This post is locked for comments