Hi,
I have been trying to update few Task level custom fields for non-summary tasks using PSI. It was working for few project plans and very few plans throwing "TaskCannotModifyProjectSummary" error. In code, clearly ignoring the Project& Task summary task.
foreach (ProjectDataSet.TaskRow tskRow in projectDs.Task) { if (tskRow.TASK_ID != 0 && tskRow.IsTASK_IS_SUMMARYNull() == false && tskRow.TASK_IS_SUMMARY == false) { if (statusManagerUid.Equals(Guid.Empty) == false) tskRow.StatusManager = statusManagerUid; } }
With curiosity, i tried to update the project without updating any custom field or any other entities. Just Read project dataset-->Checkout-->UpdateProject--> Publish-->Checkin(following is the code for the same). But still, i was getting the same "TaskCannotModifyProjectSummary". So is this something wrong with the schedule or any additional settings need to do before updating project through PSI?
ProjectDataSet projectDs = new ProjectDataSet(); projectDs = projectSvc.ReadProject(sm.ProjectUID, DataStoreEnum.WorkingStore); projectSvc.CheckOutProject(ProjectUID, sessionUid, "Updating CF Through Tool"); Guid jobUid = Guid.NewGuid(); // Update projectSvc.QueueUpdateProject(jobUid, sessionUid, projectDs, false); WaitForQueue(q, jobUid); // Publish jobUid = Guid.NewGuid(); projectSvc.QueuePublish(jobUid, sm.ProjectUID, true, string.Empty); WaitForQueue(q, jobUid); jobUid = Guid.NewGuid(); // Checkin projectSvc.QueueCheckInProject(jobUid, sm.ProjectUID, false, sessionUid, "Updating CF. Publising through Tool"); WaitForQueue(q, jobUid);
I'm happy to provide, if any further details are required to fix this problem.
Thanks, Ram