Using Array variable to store more than 5000 CRM records.

Hello Guys,

In our previous blog we have seen how we can retrieve more than 5000 records using Power Automate Flow. Today we are going to see how easily we can store these 5000 records in Array.



Do follow us to know more about Dynamics and Power Platform. Also if you like our blog then please comment and share this blog with your friends.

We will be working on same power automate flow which we demonstrated in previous blog.



Now we will be declaring three Array variables as shown below:



Expand Do until loop and below Accounts step. Add a new select step as shown below:



Now we will set the output of Select step in Array1.



In the next step we will set Array3 variable as shown below:

















union(variables('Array1'),variables('Array2'))

Now after Set Page Cookie Trim step add new step. In this step we will set Array1=Array2 and in the next step we will set Array2=Array3.



So now our flow is ready. Now we will run the flow.



As you can see flow ran successfully. Now we will add one more step outside the do until loop to check how many records Array3 variable contains. 




Now run the flow.



As we can see our Array3 variable contains more than 5K records. You can use this variable for further requirement. For example we can use the same array variable to create csv table and can use it for creating csv file. 





Hope it helps...

Comments

Popular posts from this blog

Read Only Sub Grid & Editable Sub grid in Dynamics 365

Understanding Sales Process in D365.

Understanding Business Unit in Dynamics 365.