none
PSI Calls update error-CustomFieldRequiredValueNotProvided , though only %complete is updated RRS feed

  • Question

  • Though I update only %complete of tasks, I get this error CustomFieldRequiredValueNotProvided

    I looked into the error details, Its asking for a mandatory custom field  'X" as not populated

    Analysis steps

    1.Opened project in professional, verified all tasks have this field 'X'  populated and the plan is also published.

    2. Program is not creating new tasks  but just updates %complete

    3. When I make this field 'X' a non mandatory field, the code happily executes with out issues.

    4. Also if I update any task custom fields (and not % complete) , the code executes just fine. So the problem really seems to be with standard fields(or % complete only).

    Seems to be a PSI bug. Hope some body from Microsoft acknowledge this issue

    Now my questions is, how do i circumvent this issue till Microsoft fixes the issue ?

    1. I call 

    pjDS = projDS.GetChanges().

    projectservice.QueueUpdateProject(jobId, sessionId, pjDS, false);

    2. Shall I look for all mandatory custom fields and again set their values to old value. Now I am not sure if this will help either since calling GetChanges will again remove these records in final project Data Set

    3. I am sure some body else would have faced this issue. What can be the best practice ?

    Thanks






    • Edited by Rob Neilson Wednesday, November 20, 2013 9:49 PM
    Wednesday, November 20, 2013 6:14 PM

Answers

  • The solution to your problem is that you need to send all required CustomField values. just fill out the ProjectCustomFields table within your dataset or you need to ensure that you set the required custom field entries to modified (taskRequiredCustomFieldRow.SetModified())! Else they will get removed from the dataset with the GetChanges() method.

    I hope this helps.

    Regards

    • Marked as answer by Rob Neilson Thursday, December 5, 2013 8:34 PM
    Thursday, November 21, 2013 8:29 AM
  • We had similar issue and since we were a bit ahead in game and wanted to continue runs, we just asked our operations team to flip the mandatory switch before the run and set it back to mandatory after the run(only one field was mandatory).

    However we also fixed by setting the dirty bit (SetModified())

    Hope this helps.

    And yes,  there is no reason to ask you write this additional piece of code to be written to SetModified for all mandatory fields, looks like a classical over engineering issue with PSI. I would like to call it out as a BUG. probably log one with connect.

    Regards

    Srikanth Bogadapati


    • Edited by SB97 Monday, November 25, 2013 2:47 PM
    • Marked as answer by Rob Neilson Thursday, December 5, 2013 8:34 PM
    Monday, November 25, 2013 2:42 PM

All replies

  • The solution to your problem is that you need to send all required CustomField values. just fill out the ProjectCustomFields table within your dataset or you need to ensure that you set the required custom field entries to modified (taskRequiredCustomFieldRow.SetModified())! Else they will get removed from the dataset with the GetChanges() method.

    I hope this helps.

    Regards

    • Marked as answer by Rob Neilson Thursday, December 5, 2013 8:34 PM
    Thursday, November 21, 2013 8:29 AM
  • Thanks, I will try this and get back to the forum. But does it mean this is a bug with Microsoft ?

    There could be many mandatory fields and we can submit more than 1000 records per updateproject call , So this creates a big bottle neck to look for all mandatory fields and submit then for changes.

    • Edited by Rob Neilson Thursday, November 21, 2013 3:55 PM
    Thursday, November 21, 2013 3:54 PM
  • A bug? Yes you can name it so, on the other side they just want to ensure that everything will work fine. If you ran in the problem with the 1000 row limit, you just need to send more packages. The bottleneck here will be if you have more then 999 required custom fields for one entity. But this is very unlikely. I have never seen an installation with that many custom fields.
    Friday, November 22, 2013 8:21 AM
  • We had similar issue and since we were a bit ahead in game and wanted to continue runs, we just asked our operations team to flip the mandatory switch before the run and set it back to mandatory after the run(only one field was mandatory).

    However we also fixed by setting the dirty bit (SetModified())

    Hope this helps.

    And yes,  there is no reason to ask you write this additional piece of code to be written to SetModified for all mandatory fields, looks like a classical over engineering issue with PSI. I would like to call it out as a BUG. probably log one with connect.

    Regards

    Srikanth Bogadapati


    • Edited by SB97 Monday, November 25, 2013 2:47 PM
    • Marked as answer by Rob Neilson Thursday, December 5, 2013 8:34 PM
    Monday, November 25, 2013 2:42 PM