Hi,
I have started using CSOM for my Project Online and I could successfully Read and Create Project. But was wondering how to update project level customfields. Following is my code for the same. Please let me know where I am making mistake.
var PrjList = projContext.LoadQuery(projContext.Projects.Where(proj => proj.Name == "HelloWorld")); projContext.ExecuteQuery(); Guid pGuid = PrjList.First().Id; Project p = projContext.Projects.GetByGuid(pGuid); var cfList = projContext.LoadQuery(p.CustomFields.Where(cf => cf.Name == "MyTest")); projContext.ExecuteQuery(); CustomField c = projContext.CustomFields.GetByGuid(cfList.First().Id); p.SetCustomFieldValue("MyTest", "HIIIIIIIII"); p.CustomFields.Update();
Thanks, Parth