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
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)
Solved! Go to Solution.
Hi @Anonymous ,
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.
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,
Hi @Anonymous
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.
Hi @Anonymous ,
As @DeepakS described, we can know their basic use according to the name of the action.
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:
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.
Hope this helps.
Best Regards,
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
Hi @Anonymous ,
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,
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.
I want to know how API count happens.
Hi @Anonymous ,
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.
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,