Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Design for listing Dynamics tables with many records



It seems the Flow/Dynamics connector 'List records' only return 500 records. What is the best practice design to make a loop to go through the entire table in 500 record chunks?


I note that the return is ended with:





Community Support Team
Community Support Team

Re: Design for listing Dynamics tables with many records

Hi @MS2,


Could you please share a screenshot of your flow's configuration?

Do you want to make a loop to go through 500 records within Microsoft Flow?


If you want to make a loop to go through 500 records within Microsoft Flow, I think the "Apply to each" action could achieve your needs. Within the "Apply to each" action, you could add other actions to process each record.


More details about the "Apply to each" action, please check the following article:


Please check and see if the following article would help in your scenario:


Best regards,


Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: Design for listing Dynamics tables with many records

Hi Kris,


I already solved this. The issue is not the foreach but rather that Get records (at least before the latest update) only returned 500 records at a time with no simple way to put that in a do until and keep getting the next 500 until all records have been retrieved. Especially since flow doesn't allow me to nest a foreach in a do until.


I solved it by sorting the table on an unique integer field and keeping track of the last value received and adding a ODATA filter to get greater than each do until and then call another sub-flow with the 500 records passed as a parameter-array in which there is a foreach. However this is a somewhat ugly and convoluted solution and also dependent on the entity/table having a unique field that can be sorted and compared with greater than or less than. In my case I have those fields but that's just coincidence. However, I saw something about raised limits in the last flow update so maybe this whole construct is now unnecessary, I haven't checked.


As a side note it is slightly annoying that I can't find a way to ODATA-chose which columns to select in the Dynamics connector, resulting in a lot of data being retrieved, i.e. I can't do the equivalent of SELECT Col1, Col2 FROM TableXYZ but have to SELECT * FROM TableXYZ.


Best regards,



Helpful resources


Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!


Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!


New & Improved Power Automate Community Cookbook

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


Power Automate Community User Group Member Badge

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


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (6,008)