cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Vivek_Pande
Frequent Visitor

Difference between "Get record" and "List records" methods in terms of getting related items.

Hi,

 

In dynamics 365 I have one entity name E1 which contains lookup from entity E2. So to fetch the data from a related entity I got 2 different ways.

 

1- Calling "Get record" action and passing Item identifier from E1.

2- Calling "List record" action and using the "Expand Query" field to get the related fields from entity E2

Capture9.PNG

Can anyone let me know if these 2 methods make difference in terms of counting "number of API" calls (Flow capacity perspective) and Execution of code(Performance)

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Difference between "Get record" and "List records" methods in terms of getting related items.

 

Hi @Vivek_Pande ,

 

I'm afraid I am not able to provide a more detailed answer about API count. I'm not very familiar with this part.

You could check the details of API Calls in the Power Platform Admin center.

17.PNG

Please check this link and get more details about the Power Platform Admin center:

https://docs.microsoft.com/en-us/power-platform/admin/admin-documentation

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Difference between "Get record" and "List records" methods in terms of getting related items.

Hi @Vivek_Pande 

 

As you notice the action name - List Records(plural) and Get Record (singular), so in my opinion, the following should be the best practice:

When you think your query needs to return more then one results based on filter criteria use List Records

When you are trying to filter your data by unique key use Get Record, because this will give you a single matching result.

 

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

  

 

Community Support
Community Support

Re: Difference between "Get record" and "List records" methods in terms of getting related items.

 

Hi @Vivek_Pande ,

 

As @DeepakS described, we can know their basic use according to the name of the action.

  • List records are used to return all records in the specified entity. You can configure filters to return records that meet the conditions.
  • Get record action is to return a single record in the specified entity. It needs to specify the Item identifier to get the specified record.

The configuration we often see is as follows. First, filter the records and then use Get record to get the details of the specified record:

133.PNG

 

If it is the situation you describe, one entity contains the lookup column of another entity, then you can directly obtain the records contained in the lookup table by lookup column id.

For example, the Account entity contains a lookup column of Owner, then we can use the User entity to get the user info of the Owner. Because the Owner field is the lookup column, it refers to the record in the User entity.

134.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Vivek_Pande
Frequent Visitor

Re: Difference between "Get record" and "List records" methods in terms of getting related items.

Hi @v-bacao-msft,

 

I agree with the steps mentioned by you. But instead of using "Get record" action to fetch the "Users" details by passing "item identifier", can't we use expand query field inside "List records" action and get the details of the "Users"?

 

if yes, then how the above two methods make a difference in terms of counting "number of API" calls (Flow capacity perspective) and Execution of code(Performance).

 

Do let me know if you want any more info.

 

@DeepakS , thanks for your reply, I know the basic difference between the two actions 😊. Please look above highlighted text for my exact query.

 

Thanks

Community Support
Community Support

Re: Difference between "Get record" and "List records" methods in terms of getting related items.

 

Hi @Vivek_Pande ,

 

If you are familiar with the syntax that needs to be configured in the Expand query, then you can directly configure the Expand query to improve the execution efficiency.

 

If you first get the records, then iterate through all the records and use Get record to get the details, this is indeed a few more steps than the previous method and requires more time to execute.

 

You can compare the total time spent by different methods to view the performance of each action. This is a very intuitive data.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Vivek_Pande
Frequent Visitor

Re: Difference between "Get record" and "List records" methods in terms of getting related items.

Hi @v-bacao-msft ,

 

I was looking into the licensing part of the flow from this link and in this article, it's mentioned that the user gets only a certain number of API requests based on their license. Please find below image which I am referring to.

 

Capture.PNG

I want to know how API count happens.

Community Support
Community Support

Re: Difference between "Get record" and "List records" methods in terms of getting related items.

 

Hi @Vivek_Pande ,

 

I'm afraid I am not able to provide a more detailed answer about API count. I'm not very familiar with this part.

You could check the details of API Calls in the Power Platform Admin center.

17.PNG

Please check this link and get more details about the Power Platform Admin center:

https://docs.microsoft.com/en-us/power-platform/admin/admin-documentation

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,599)