Project Server 2016
3 TopicsFriday Five: Microsoft Kaizala, Ignite 2018, and More!
First published on MSDN on Dec 28, 2018 Project Server 2016: Missing Alerts And Reminders SettingsMohamed El-Qassas is a Microsoft MVP, SharePoint StackExchange Moderator, C# Corner MVP, TechNet Wiki Ninja, Blogger, and Senior Technical Consultant with +10 years of experience in SharePoint and Project Server584Views0likes0CommentsProject Server - StatusingInvalidInterval error when trying to add assignment to a task using CSOM
Hi, Project Server 2016 - I have requirement of adding new resource assignments to a task using CSOM which should go for PM approval. I know how to add assignments directly to a Task using CSOM but that doesn't go to PM for approval. So i did some research and found a way to do this. The code is working fine when i try to add first resource assignment on the task and the assignment is routed for PM approval but the same code is failing with "StatusingInvalidInterval" error when i try to add second resource assignment on the same task. var resource = m_ProjectContext.EnterpriseResources.GetByGuid(m_ID); m_ProjectContext.Load(resource, r => r.Assignments); m_ProjectContext.ExecuteQuery(); StatusAssignment statusAssignment = resource.Assignments.Add(new StatusAssignmentCreationInformation() { Comment = string.Format("Assignment created on {0}", DateTime.Now), Id = new Guid(), ProjectId = projectId, Task = new StatusTaskCreationInformation() { Id = taskId ,Start = startDate ,Finish = finishDate } }); statusAssignment.SubmitStatusUpdates(string.Format("Assignment created on {0}", DateTime.Now)); m_ProjectContext.ExecuteQuery(); //i am receiving the error here I did lot of research but couldn't find a clue at all. Anyone had the similar issue ? or any help is much appreciated. Regards, Sunil G.818Views0likes0Comments