Add ressource custom field value with PSI 2013 RRS feed

  • Question

  • Hi.

    I'm learning how develop with the Project Server PSI 2013. I succeed add project custom field value, via the SetCustomFieldValue method, but that method doesnt exist in the EnterpriseRessource class.

    So i add my value directly in the FieldValue property but i have an exception saying that the field doesnt exist, but he's in the context custom field collection when i update the Enterprise Ressource Collection.

    Someone has a sample of adding a custom field value in a ressource via the PSI of Project Server 2013 ? For example in the RBS field.


    Monday, May 12, 2014 7:15 PM


All replies

  • Hi,

    As you mentioned the SetCustomFieldValue method I assume that you are referring to the CSOM and not PSI api's? 

    If so then although I haven't done this myself a quick look through MSDN points to this being the method you need:


    Seems the object itself links to the SetCustomFieldValue get; set; methods, so I assume your code would need to look something like:

    myResource["CustomFieldInternalName"] = "New custom field value";


    Martin Laukkanen
    Nearbaseline blog - nearbaseline.com/blog
    Bulk Edit and other Apps - nearbaseline.com/apps

    • Marked as answer by Drakta Tuesday, May 13, 2014 10:20 PM
    Tuesday, May 13, 2014 2:19 PM
  • Indeed I was referring to the CSOM. But the CSOM isn't a part of the PSI ?

    Thank for your answer I will test as soon as possible.

    Tuesday, May 13, 2014 4:12 PM
  • Thank you very much that works !

    PS : after set the value, update the resource collection and execute the query. To see the new value reload the resource (or resource collection).

    Tuesday, May 13, 2014 10:20 PM