cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
arpost
Advocate IV
Advocate IV

How do I include Dataverse lookup records in a new Dataverse record?

I am trying to add a new record to the Dataverse and populate two lookup columns using dynamic content from Dataverse tables. Every time I try to add a new record, I get a "Resource not found for the segment XXXXX" message. My flow is configured as follows:

arpost_0-1628700500852.png

The Get Created Model is a "Get by Row ID" and the "Get Default Forecast Values" is a "List rows" step, so I'm wanting to create a new record for each Forecast Value and link to the Fee Type and the ForecastModel from the previous steps.

 

Anyone have any ideas? About to pull my hair out.

 

1 ACCEPTED SOLUTION

Accepted Solutions
arpost
Advocate IV
Advocate IV

So I figured it out with the help of this blog post (https://linnzawwin.blogspot.com/2019/11/power-automate-how-to-set-lookup-field.html). I saw some similar posts in the Community forum as well but didn't quite make sense of it until I found this article.

 

To summarize, it appears that the current Dataverse connector STILL expects users to input the plural name of the Dataverse field and then enclose the dynamic GUID content block in parens:

arpost_0-1628720083587.png

 

Why? I have no idea... I've heard it was "by design," but this literally took hours for me to figure out, so I hope the Microsoft team will resolve that behavior as it turns the "low-code/no-code" nature of the Power Platform into "low-code/no-code/hope-you-can-stumble-across-a-solution-code"! 😞

View solution in original post

11 REPLIES 11
arpost
Advocate IV
Advocate IV

So I figured it out with the help of this blog post (https://linnzawwin.blogspot.com/2019/11/power-automate-how-to-set-lookup-field.html). I saw some similar posts in the Community forum as well but didn't quite make sense of it until I found this article.

 

To summarize, it appears that the current Dataverse connector STILL expects users to input the plural name of the Dataverse field and then enclose the dynamic GUID content block in parens:

arpost_0-1628720083587.png

 

Why? I have no idea... I've heard it was "by design," but this literally took hours for me to figure out, so I hope the Microsoft team will resolve that behavior as it turns the "low-code/no-code" nature of the Power Platform into "low-code/no-code/hope-you-can-stumble-across-a-solution-code"! 😞

testasdfasfsafa
Advocate IV
Advocate IV

I just wasted a ton of time on this issue. I don't know why Microsoft took something simple (like selecting the GUID) and forcing a user to find the logical name or internal name and make it plural, etc...   This is NOT "workflow for everyone" as Microsoft claims.

@arpost thanks for sharing - you saved me hours - I never would have figured that out.

You’re welcome! Glad it helped.

manishhada1985
Regular Visitor

This plural thing really a problem and it wasted lots of my time. 

testasdfasfsafa
Advocate IV
Advocate IV

This is terrible design...  the previous Dynamics 365 and legacy dataverse doesn't need this kind of complicated input.  Just you put the lookup id and you were done.   Going backwards...  This product is so messy on so many ways, it's frustrating. Please change the leadership team...

Hola, coincido  con Tigo , para las cargas masivas o insertar en diferentes tablas es muy tedioso sin embargo he encontrado una forma de hacerlo y espero que te pueda servir 

🚀como realizar una carga masiva a Dataverse sin flujos - YouTube 

 

PowerExpertise
Regular Visitor

To know how to write to complex columns in dataverse , go to my YouTube video .

I have explained in details , how to update/Add dataverse lookup column using power automate 

https://www.youtube.com/watch?v=hstUL0UfnI4

 

 

JevonH
Frequent Visitor

I have Tried every "incantation" to add a lookup field value to a table using Power automate including

ntt_estimationfactors(8c6fc718-xxxx-xxxx-xxxx-000d3a338055)

ntt_estimationfactors/8c6fc718-xxxx-xxxx-xxxx-000d3a338055

/ntt_estimationfactors/8c6fc718-xxxx-xxxx-xxxx-000d3a338055

 

I am able to use GetRowById using the guid so I know the record exists.  

 

I have validated the lookuplogicalname for the lookup field

JevonH_0-1673538494995.png

 

Am I missing something?  Has something changed?

 

Cheers

testasdfasfsafa
Advocate IV
Advocate IV

Sadly, Microsoft made create/updating records with lookup values so much harder now....   2 years ago, we had a dedicated Dynamics 365 action and old the Dataverse action and it was super easy, simply add the id of the item and you were done...    We've gone completely backwards.     This is NOT workflow for everyone as they claim.

JevonH
Frequent Visitor

Hey All,  Managed to solve my own issue.  It turns out that most times the 'logicallookupname' will work for you, however sometimes it's not even the correct choice.
I followed the following article and got the answer I was looking for. (https://tomriha.com/how-to-update-dataverse-lookup-column-with-power-automate/)

 

So when I grabbed the Json of the Solution Project Table (which contains the lookup column I'm trying to set)  I found the logicallookupname of ntt_estimationfactors

JevonH_0-1673541666859.png

It turns out what I should have done is taken my Org URL from the top of the JSON up to the v9.1

JevonH_3-1673541989287.png

 

Pasted that url into a browser window and searched for my table

JevonH_2-1673541918519.png

 

Where I found the name it was looking for was ntt_estimationfactorses.

 

I could then use this name as follows:

JevonH_4-1673542115833.png

 

That's seriously a bunch of hoops to have to jump through just to add a row.

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,806)