One thing that drove me crazy on a regular basis was getting more than 5000 records from Dataverse in Power Automate. It felt like sometimes it was working while in other cases it was not. Microsoft’s documentation clearly states that it SHOULD be working when you are using Pagination 👍
A quick test on the Contact entity without any filters says this is true, first done without pagination returns exactly 5000 records. With pagination I get 38176:
⛔ Pagination does not always work
So far so good. But in a lot of cases when I was building Cloud Flows it would not work. It took me some time but I found out that pagination does not work when you are using the Fetch XML query to filter. This is a bit disappointing since this is the option I’m using the most when working with List Records in Dataverse. Maybe Microsoft could add that as a feature? 😇
👌 FetchXML Builder and OData to the rescue
Once you know what the problem is you can find a solution. In this case, pagination still works when you are using the OData filter. So the quickest way for you to convert your FetchXML to OData filters is FetchXML Builder by Jonas Rapp in the XrmToolBox.
If you have your FetchXML in there you can click on “View” -> “Power Automate Parameters”. It will create the corresponding OData filter which you can use in the “Filter rows” parameter of the “List Records” action.
Yay! 😊 So I guess this one the cases where you just need to know it, hope this helps some of you as well!