Get resource base capacity using CSOM

251 views Asked by At

How to get resource base capacity of each day in a particular duration (Between Start & End Date) using CSOM on the project online or on-premise?

Not being able to find any solution regarding this.

I want CSOM Equivalent for the below OData Call:

/_api/ProjectData/ResourceTimephasedDataSet?$filter=ResourceId eq guid'\(resourceID)' and TimeByDay ge datetime'\(StartDate)' and TimeByDay lt datetime'\(EndDate)'
1

There are 1 answers

0
Stephen Turner On

CSOM is ideally suited for getting and manipulating individual records in Sharepoint and in your case Project Web Access (PWA), but it doesn't give full access to what's available in PWA nor does it give you derived information.

There aren't CSOM equivalents for OData queries. To get this via CSOM you would need to fetch all the records the query used, apply the same joins and filtering from the query and then perform any calculations the query did.

You have an OData query to get the information you want, it would be better to use that directly.