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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to update a Lookup...
Power Automate
Unanswered

How to update a Lookup field in CRM using LogicApp Flow

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have created a LogicApp to pull data from CosmosDB and send to CRM. All of my fields cross over except the "lookup" fields. 

For example, Feature Category, is a Lookup field within CRM.

 

Any field that looks like this with the magnifying glass: 

 
 

lookup.PNG

 

 

 

My question, is how would I implement this in the Logic App?

Just doing this does not work, even when I add quotes. 

 

12.PNG

 

 

 

 

 

The Feature Category that I pulled from CosmosDB already  has a value:

 

13.PNG

 

 

 

My dilemma is:

How can I get this 'lookup' field to accept my value within the LogicApp?

 

I tried doing this and it does not work:

 

 

14.PNG

 

Any help or suggestions are appreciated.

Categories:
I have the same question (0)
  • Verified answer
    Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hello @jasmine2020 

     

    You need to do a list records on the entity that the lookup is from.

     

    Doing the list records will get you the Primary Id.

    This ID can be identified by the guid.

    For example if my entity is Accounts. The field I will need to grab from  the list records will be called Account.

     

    this guid is what needs to be passed into the lookup.

  • jasmine2020 Profile Picture
    Microsoft Employee on at

    Hi, 

     

    I see the ListRecords option here, but I am still unsure of exactly how this works.

     

    jasmine2020_0-1596510312323.png

    So I am wanting to autopopulate the fields within CRM with the data that I have in CosmosDB:

     

    jasmine2020_1-1596510382969.png

    But because its a 'lookup' I keep getting an error. How would I use List Records to solve this, when it doesnt contain the 

    'Feature Category' field that I need?

     

    jasmine2020_2-1596510500853.png

    I am new and am just trying to understand. Please add insight if you can. Thank you

     

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hi @jasmine2020 

     

    Okay no problem. The first thing we need to do is understand the entities that are being used.

     

    We need to check what the data types are inside the Features entity.

     

    could you run the flow with the list records action on the features entity, like in your picture.

    you could use the top count option and put 2 so only 2 records will get returned.

     

    if you could please paste the output of the list records. This will help me better understand your data model so I can better assist you

  • jasmine2020 Profile Picture
    Microsoft Employee on at

    Sure thank you. Here is my full logic app:

    jasmine2020_0-1596516526125.png

     

    jasmine2020_1-1596516623602.png

     

    jasmine2020_3-1596516678091.png

     

    jasmine2020_5-1596516732340.png

     

     

    Is this what you need?

     

  • jasmine2020 Profile Picture
    Microsoft Employee on at

    Oh I think I misunderstood.

     

    Do I need to actually 'Run' this?

     

     

     

    jasmine2020_0-1596516969855.png

     

     

    and then view the output??

     

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hi @jasmine2020 

     

    Thank you for sharing.

    Kind of, I actually need to see the data inside your feature entity

    Could you add a list records under your http trigger.

    Select your Features entity and, run the Logic app.

     

    Please share a sample of the output from the list records action.

  • jasmine2020 Profile Picture
    Microsoft Employee on at

    jasmine2020_0-1596517282102.png

     

     

    Here are some of the outputs after I ran this: 

     

    jasmine2020_1-1596517356424.png

     

     

     

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Thanks @jasmine2020 

     

    This helps a ton!

     

    Does the feature entity contain any real data yet? Or are you basically transferring all cosmosDB to CDS?

  • jasmine2020 Profile Picture
    Microsoft Employee on at

    No thank you!

     

    No it doesn't really have the data in it yet, I am just trying to see how I can push the data from cosmosDB into this 'lookup' field.

    I had to add that parameter:

     

    feature category

     

    jasmine2020_0-1596517879727.png

     

     

    The feature category looks like this in CRM:

    jasmine2020_1-1596517917062.png

    Since its a 'lookup', this is whats confusing me....

     

     

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    @jasmine2020 

    So a lookup is just another table, that can relate to one or more other tables. And the way they relate is by using the PrimaryID / guid.

     

    Okay so, since features has no data. You will have to create the lookup before you can use it.

     

    Could you check and see if the features entity has a name field?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard