cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jasmine2020
Microsoft
Microsoft

Record ID not appearing in CDS List Records

 

 

I did this to locate the GUID for the Features Category lookup. The LogicApp ran well but the output is [] an empty array (see below)

 

:

jasmine2020_4-1596599182008.png

 

jasmine2020_6-1596599225221.png

 

 

 

 

Does this mean that the CRM does not have the ID for this lookup?

 

Also, for this text field, below, there are over 3000 distinct texts, similar to the ASME: Azure stack. Does this mean I have to perform the list record for every single text?

 

jasmine2020_7-1596599261961.png

 

 

 

 

Also, where do I find the name for the search query? for example for the Features Category, I guessed at ems_name. But how do I know this for sure?

 

 

Finally, once I located the GUID, how do I place this in the logic app?

 

jasmine2020_8-1596599328022.png

 

 

Any help is appreciated

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jcook
Super User
Super User

Hello @jasmine2020 ,

 

I have build a small Proof of Concept (POC) for you based on all the information you have provided.

 

For context, in my POC I will be using 2 entities

One called Activities -- These are top level, activities will have tasks created under them by a lookup.

One called Tasks -- These are bottom level, all tasks have a lookup field to relate the tasks to the activities.

 

I will have an activity name, and will be checking if it exists in my Activity entity

 

My POC:

First we want to initialize a Variable string for our GUID later on.

Jcook_1-1596609528796.png

 

 I will use a list records with a filter to check if my activity name is found in CDS

Jcook_0-1596609387066.png

 

Next we want to add a If condition to check if the output from our list records is empty or not..

We can do this using an expression called length( ) and passing in the value

Type length() in the expression tab, than click dynamic content and select the value from the List records action

You will want to match my condition below is greater than 0

Jcook_2-1596609753255.png

 

Now in the if true block:

 

We will add a Set variable action

and select our variable that we created at the beginning, now in the dynamic content find the field that says

"Unique Identifier for entity instance"

This is grabbing the guid from the list records

NOTE an apply to each will be created automatically like in my picture below. This is fine

Jcook_3-1596610115332.png

 

Now in the if False branch:

Create a new activity with the activity name. since it does not exist in our entity.

Now using a set variable just like in the If true branch, we set the same variable with the same value (guid) but this time we select the dynamic content from the create a record

Jcook_4-1596610389112.png

 

Now outside the condition, we create can create new tasks that can relate to the Activities since we have the lookup value regardless if the activity exists or not.

 

In my POC the lookup field in my task entity is where I place the variable that has the GUID from the activity.

Jcook_5-1596610738528.png

 

 

Hopefully this helps you!


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

1 REPLY 1
Jcook
Super User
Super User

Hello @jasmine2020 ,

 

I have build a small Proof of Concept (POC) for you based on all the information you have provided.

 

For context, in my POC I will be using 2 entities

One called Activities -- These are top level, activities will have tasks created under them by a lookup.

One called Tasks -- These are bottom level, all tasks have a lookup field to relate the tasks to the activities.

 

I will have an activity name, and will be checking if it exists in my Activity entity

 

My POC:

First we want to initialize a Variable string for our GUID later on.

Jcook_1-1596609528796.png

 

 I will use a list records with a filter to check if my activity name is found in CDS

Jcook_0-1596609387066.png

 

Next we want to add a If condition to check if the output from our list records is empty or not..

We can do this using an expression called length( ) and passing in the value

Type length() in the expression tab, than click dynamic content and select the value from the List records action

You will want to match my condition below is greater than 0

Jcook_2-1596609753255.png

 

Now in the if true block:

 

We will add a Set variable action

and select our variable that we created at the beginning, now in the dynamic content find the field that says

"Unique Identifier for entity instance"

This is grabbing the guid from the list records

NOTE an apply to each will be created automatically like in my picture below. This is fine

Jcook_3-1596610115332.png

 

Now in the if False branch:

Create a new activity with the activity name. since it does not exist in our entity.

Now using a set variable just like in the If true branch, we set the same variable with the same value (guid) but this time we select the dynamic content from the create a record

Jcook_4-1596610389112.png

 

Now outside the condition, we create can create new tasks that can relate to the Activities since we have the lookup value regardless if the activity exists or not.

 

In my POC the lookup field in my task entity is where I place the variable that has the GUID from the activity.

Jcook_5-1596610738528.png

 

 

Hopefully this helps you!


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (4,003)