0

I have on-premise SharePoint 2019 and MS Sql Server 2019. I use CSOM to set actual work for resources.

public TimePhase getResourceTimePhaseAssignments(EnterpriseResource resource, DateTime startDate, DateTime finishDate)
{
TimePhase currentTimePhase = resource.Assignments.GetTimePhase(startDate, finishDate);
projContext.Load(currentTimePhase.Assignments);
projContext.ExecuteQuery();
return currentTimePhase;
}

Running this code I get exception: Too many resources: 1073. You cannot load dependent objects for more than 1000 resources. Use a filter to restrict your query.

I found several unanswered threads related to this issue:

  1. https://social.microsoft.com/Forums/en-US/b0375b33-808d-439d-bb49-20ca0a02c695/you-cannot-load-depen...

  2. https://social.technet.microsoft.com/Forums/azure/en-US/4fab5f62-5955-4257-af0f-a5e1fa58dca7/error-r...

I didn't find any decision for my case. Is it possible to apply a filter in the code?

Or is it possible to increase a limit of 1000 resources somewhere on the server side?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.