Forum Discussion

jbrines's avatar
jbrines
Advocate III
1 year ago
Solved

Issue with List.Generate

Hi Guys,   Got the top part of the code via CoPilot.   It works fine on SharePoint Lists with less than 5000 records but as soon as I try it on a list with more that 5000 records it gives an erro...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi jbrines ,
    Thank you for the followup.I would be happy to assist you!

    when working with large SharePoint lists, it is best not to use $skip or $skiptoken manually. The recommended way is to use SharePoint.Tables, which automatically manages paging and avoids the 5,000-item threshold issues. You may find this approach in Microsoft’s documentation on SharePoint.Tables, and more about handling large lists here

    Hope this helps.If so,consider accepting it as solution.