none
Update Custom Fields - what is the best practice? RRS feed

  • Question

  • I noticed in the ProjTool.exe code the project.QueueUpdateProject(<parameters>) method is used to update data  -- including changes to any custom fields.  This method takes in a ProjectDataSet as a parameter.  the ProjectDataSet contains the latest info which gets pushed back to the database.

    I also saw that the CustomFields Web Service (PSI) has a method called UpdateCustomFields() - but I don't see any documentation or examples anywhere. What is the best practice for updating custom fields??   My custom field is a number (no lookup table).

    Sunday, May 23, 2010 10:26 PM

Answers

  • QueueUpdateProject acts on custom field values (as well as other entities such as tasks) in a specific project that is checked out. UpdateCustomFields acts on the enterprise custom field definition -- create, modify, or delete an enterprise custom field.

    In Project Serve 2010, if the enterprise custom field is calculated by a formula, the best practice is to use the UpdateCustomFields2 method and related methods, which handle formulas in a language-dependent format. The code example in the SDK shows the difference. For example, the formula representation of the Cost field in UpdateCustomFields is [MSPJ188743685] . The formula representation of the Cost field -- in an English installation of Project Server -- in UpdateCustomFields2 is [Cost] . In a German installation, the formula would be [Kosten] .

    --Jim

    Monday, May 24, 2010 4:34 AM

All replies

  • QueueUpdateProject acts on custom field values (as well as other entities such as tasks) in a specific project that is checked out. UpdateCustomFields acts on the enterprise custom field definition -- create, modify, or delete an enterprise custom field.

    In Project Serve 2010, if the enterprise custom field is calculated by a formula, the best practice is to use the UpdateCustomFields2 method and related methods, which handle formulas in a language-dependent format. The code example in the SDK shows the difference. For example, the formula representation of the Cost field in UpdateCustomFields is [MSPJ188743685] . The formula representation of the Cost field -- in an English installation of Project Server -- in UpdateCustomFields2 is [Cost] . In a German installation, the formula would be [Kosten] .

    --Jim

    Monday, May 24, 2010 4:34 AM
  • Thanks for the great answer!  Very clear.
    Monday, May 24, 2010 11:25 AM