User (Resource) custom field Update Using CSOM RRS feed

  • Question

  • How do i update the User (resource) level custom field using CSOM in Project Online.

    Thanks, Parth

    Friday, January 17, 2014 5:57 AM

All replies

  • Here is the Code which updates the User Level Field, but no luck in updating the User's CustomFields

                        var entRes2Edit = projContext.EnterpriseResources.GetByGuid(entResUid);
                        Dictionary<string, object> a = entRes2Edit.FieldValues;
                        Console.WriteLine("\nEditing resource : GUID : Can Level");
                        //Console.WriteLine("\n{0} : {1} : {2}", entRes2Edit.Name, entRes2Edit.Id.ToString(), entRes2Edit.CanLevel.ToString());
                        // The entRes2Edit object is in the EnterpriseResources collection.
                        entRes2Edit.CanLevel = false;
                        entRes2Edit.Email = "";
                        entRes2Edit.FieldValues.Add("Custom_b518376a-0263-e311-8009-00155d84cd1a", "");
                        // Save the change.

    Thanks, Parth

    Friday, January 17, 2014 5:59 AM
  • Anyone has any updates on this post!?

    Thanks, Parth

    Monday, January 20, 2014 9:01 AM
  • anyone has any updates on the same!?

    Thanks, Parth

    Tuesday, January 21, 2014 4:50 AM
  • Can someone suggest anything for this!!?

    Thanks, Parth

    Monday, January 27, 2014 6:18 AM
  • Hi Parth,

    I noticed that no one has answered your post on updating Resource custom fields using CSOM.  I've been working on something similar, so I will try to offer suggestions.   My first question is whether the field is a local custom field or an enterprise custom field?  If it is the former, you may be out of luck with CSOM, based on my experience.  If it is the latter, please be more specific on what errors you see when you execute your code sample.

    ...Jim Black

    Monday, December 21, 2015 2:13 PM
  • Hi Jim,

    I am afraid that is the enterprise custom field. I know if that is in MSP we can write Macro or something and update the same. but i needed help in updating via CSOM.

    one thing i never understand why MS forces developer to go with CSOM instead of Standard Web Services call even when they are not fully equipped to handle the customer requirements.

    Thanks, Parth

    Tuesday, December 22, 2015 8:41 AM
  • Hi Parth,

    I have been successfully reading the values of Enterprise Custom Fields in CSOM, but have never needed to update them.   When you execute your code, does it give an error or does it just silently fail to update the field values?

    Yes, several developers like you and I are disappointed that MSFT forces us to use CSOM rather than PSI for Project Online and yet CSOM does not do some fundamental things that our customers need us to do.  All we can do is to give them strong feedback so that maybe Office 2016 will contain the fixes and enhancements.

    ...Jim Black

    Tuesday, December 22, 2015 2:28 PM
  • I am waiting for an answer on this too, it's been posted in several places on this forum in various forms and no one has responded. If we are being forced to use CSOM, we need parity with what PSI can do and right now I am seeing a lot of misses for CSOM.
    Tuesday, December 22, 2015 5:54 PM
  • this link maybe helpful


    Thursday, January 7, 2016 6:47 PM