CSOM Could not add budget cost to the summary task RRS feed

  • Question

  • I could not add budget cost using the below CSOM code. Can someone let me know if there is a different way to do it? 

    The task id that needs in this assignment is Project Summary Task as that is how we update Budget Details.

    //Load project with SummaryTaskId
     prjContext2.Load(newPublishProj, p => p, p => p.SummaryTaskId);
                                                DraftAssignment assignment1 = draft.Assignments.Add(new AssignmentCreationInformation()
                                                    ResourceId = guidResourceId,
                                                    TaskId = newPublishProj.SummaryTaskId,
                                                    Id = Guid.NewGuid()
                                                assignment1.BudgetedCost = budgetCost;

    Wednesday, April 5, 2017 11:59 AM

All replies

  • Hi Abhinesh

    Were you able to resolve this issue.  I am using the rest request  Post-ReSTRequest $toSiteUrl "ProjectServer/Projects('$projectid')/Draft/Assignments/Add" $body via powershell and everything runs clean all my assignments are added except for the task 0 budget assignments.  Wondering if you found a work around.



    Don Landry

    Wednesday, October 2, 2019 12:38 PM