Project Online CSOM: Get Assignment work per day plan

%3CLINGO-SUB%20id%3D%22lingo-sub-2404236%22%20slang%3D%22en-US%22%3EProject%20Online%20CSOM%3A%20Get%20Assignment%20work%20per%20day%20plan%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2404236%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20created%20a%20simple%20CSOM%20Application%20in%20VB.NET%20and%20i%20am%20able%20to%20view%20the%20assignments%20are%20assigned%20to%20Resource.%3C%2FP%3E%3CP%3Ei%20have%20used%20following%20code%20to%20get%20Assignments%20for%20a%20resource%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%20Dim%20entResUid%20As%20Guid%20%3D%20New%20Guid(ListView3.SelectedItems.Item(0).SubItems(0).Text)%0A%20projContext.Load(projContext.EnterpriseResources.GetByGuid(entResUid))%0A%20projContext.ExecuteQuery()%0A%0A%20Dim%20ResourceOne%20%3D%20projContext.EnterpriseResources.GetByGuid(entResUid)%0A%0A%20Dim%20ResAssignment%20%3D%20projContext.EnterpriseResources.GetByGuid(entResUid).Assignments%0A%20projContext.Load(ResAssignment)%0A%20projContext.ExecuteQuery()%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20code%20is%20working%20fine%2C%26nbsp%3B%20for%20example%20i%20got%20the%20%22Work%22%20for%20a%20single%20assignment%20as%2020hours.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20i%20need%20the%20work%20allocated%20per%20day%20says%20FirstDay%208%20hrs%2C%20SecondDay%208hrs%20and%20third%20day%204%20hrs%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20possible%20to%20get%20the%20work%20allocated%20per%20day%20instead%20of%20total%20work%20for%20assignment%20in%20CSOM.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eplease%20help%20me%20to%20get%20output%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2404236%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOnline%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EProject%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Hi,

 

I have created a simple CSOM Application in VB.NET and i am able to view the assignments are assigned to Resource.

i have used following code to get Assignments for a resource:

 Dim entResUid As Guid = New Guid(ListView3.SelectedItems.Item(0).SubItems(0).Text)
 projContext.Load(projContext.EnterpriseResources.GetByGuid(entResUid))
 projContext.ExecuteQuery()

 Dim ResourceOne = projContext.EnterpriseResources.GetByGuid(entResUid)

 Dim ResAssignment = projContext.EnterpriseResources.GetByGuid(entResUid).Assignments
 projContext.Load(ResAssignment)
 projContext.ExecuteQuery()

 

the code is working fine,  for example i got the "Work" for a single assignment as 20hours.

 

But i need the work allocated per day says FirstDay 8 hrs, SecondDay 8hrs and third day 4 hrs

 

Is possible to get the work allocated per day instead of total work for assignment in CSOM.

 

please help me to get output

 

Thanks

0 Replies