CSOM - Required Fields RRS feed

  • Question

  • Hi,

    When trying to create a project from the MSDN tutorial, using CSOM - it fails with the error "CustomFieldRequiredValueNotProvided"

    From what I can see the ProjectCreationInformation class does not support setting custom fields, and the PublishedProject object that you create also does not allow setting field values - only reading them.

    How can we create a project using CSOM in an environment where there are required custom fields?

    This is for On Premise, Project Server 2013, SP1 with Dec 2014 CU.


    Wednesday, December 16, 2015 8:57 AM

All replies

  • I don't think I have ever seen a good response from anybody on this and several people have asked.

    In the meanwhile, is your required field a based on a lookup table? If it is, can you try setting it to a default value when you configured the custom field? The default value could be "Not Set" or something similar.

    Also, for OnPrem, maybe you can still use the PSI to create the project and might have better luck.

    In general, I always try to steer my clients away from using "required fields" as they tend to be problematic.

    Friday, December 18, 2015 3:29 PM
  • Hi Nico,

      When you are creating a project you need to supply it with basic information like Project Title, project owner and start date (these are mandatory), you need to save the project after this. 

      Afterwards fetch the guid and then set custom fields with values you intend to do. Publish afterwards, it should notresult in error if all values are set. 

    Regards, Syed Faizan ur Rehman, CBPM®,PRINCE2®, MCTS

    Sunday, December 20, 2015 5:38 AM