Search records - Microsoft Dynamics

Does anyone of you know, how can I obtain more than 5000 records, that are being returned from Search Record activity from Microsoft Dynamics?
Thank you.

you can achieve it by using the Skip property of Search Records activity

If you want to fetch, intTargetRecs 15000 records.

Use a integer variable, intSkipRecs,initialize it to 0

Use a integer for loop, intCounter, Initialize to 0

Have a number of loops counter, intLoops value should be intTargetRecs/5000

Now use a Do While loop, condition should be counter < intLoops

use Search Records activity with having intSkipRec in the Skip field in property
Get the records wherever you need

Then increase the intCounter = intCounter + 1
Increase the intSkipRecs = intSkipRecs + 5000

Make sure you use, append range if you are pasting the data from Records in an excel file.

Hope this helps!

Thank you Sir.
I’m afraid that activity “Search Record” from Microsoft Dynamics package does not have mentioned Skip field. Unfortunately.
It does have only QueryOptions as Dictionary.
Any other ideas to that issue?

yes, sorry just checked it is not in the official package yet.

We can create the activity that has a filter command sent with the API used by the existing activity.

So I am afraid you can only use the QueryOptions to send a filter explicitly to fetch the records

1 Like