1
using (var Context = new ProjectContext(PWA_Url))
    {
         Load resources and custom fields
        Context.Load(Context.EnterpriseResources);
        Context.Load(Context.CustomFields);
        Context.Load(Context.LookupTables);
        Context.ExecuteQuery();

        var newResourceId = Guid.NewGuid();
        var newResourceInfo = new EnterpriseResourceCreationInformation
        {
            Id = newResourceId,
            IsBudget = false,
            IsGeneric = false,
            IsInactive = false,
            Name = "Test_User",
            ResourceType = EnterpriseResourceType.Work
        };
        Context.EnterpriseResources.Add(newResourceInfo);
        Context.EnterpriseResources.Update();
        Context.Load(Context.EnterpriseResources);
        Context.ExecuteQuery();
    }

Getting timeout error on Context.ExecuteQuery();

But after 50 mins the resource is getting created in the resource center

As we need to upload multiple resources its getting error on the first go itself.

0 Answers0