23 maja 2010 22:26
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).
24 maja 2010 04:34
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] .
24 maja 2010 11:25Thanks for the great answer! Very clear.