Skip to content

How to update lookup fields based on an alternate key with Power Automate?

Let’s say that you are importing Contacts to Dataverse and you would like to set the parent account lookup field based on a Company’s Business ID and you do not have the account GUID available on your dataset. 
 
If you have the Business ID already in the system, and it is unique, you can define it as an alternate key in Dataverse. This will make your flow a lot smoother as you do not need to use the list records action first to find the correct account and its GUID.
 
First, you need to configure the alternate key for the entity:

 

image-2.png

 
 
 
Note: it takes a little while before the newly set alternate key comes usable (you can check the Status active/pending).
 
After having the alternate key set up, you can use it on Power Automate with the following syntax when mapping to the lookup column:
 
accounts(ff_BusinessId=’123456-7′)
 
 
Tip: Alternate keys are not supported in the Get a Row by ID -action which is really unfortunate as it would be really handy.  If you want to use the alternate key to update a record, you need to use the Dataverse Web API.
 
 
 
 

 

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *