Custom Project Fields - Starting over..

J

Joe Wilcox

Ok, after 2 days of working this I think I have a better understanding
of the underlying code but I still can't see to fix this. Here is my
delima.

Our project has several custom fields defined for it. Some examples
are: "Scrummed", "MS", "Category". These descriptions are stored in
the MSP_PROJECT_CUSTOM_FIELDS table of the database.

Their values are stored in the MSP_TASK_CUSTOM_FIELD_VALUES table.

I would suspect that my ProjectDataSet's ProjectCustomFields member
should hold this text. It doesn't. In my case, it's empty.

Here is an example of how I'm trying to access it:

I've added the web reference ProjectWebSvc that points to
"_vti_bin/psi/project.asmx".

I then read the project (GUID is correct)

ProjectWebSvc.ProjectDataSet projectDs = projectSvc.ReadProject(new
Guid("c1d66023-8bd3-432f-866a-de3d6b3debe7"),
ProjectWebSvc.DataStoreEnum.WorkingStore);

projectDs.Tasks holds the expected tasks
projectDs.Resources holds the expected resources
projectDs.TaskCustomFields holds all of the custom field values

but

projectDs.ProjectCustomFields is empty. Looking at the database, that
data is there. I've also tried:

ProjectWebSvc.ProjectDataSet projectDs =
projectSvc.ReadProjectEntities(new
Guid("c1d66023-8bd3-432f-866a-de3d6b3debe7"),32,ProjectWebSvc.DataStoreEnum.WorkingStore);

Which also returns an empty set. I guess I just don't get this. Any
help? Also, can anyone suggest a good book that covers working with
Project Server in C#?

Thanks.

Joe.
 
R

Rod Gill

If you look at the Views in the Reporting database, the ones ending with
_userview have custom fields added automatically to the end of them. Does
that help?

I think there are other views created for multi-choice fields as well. I
would write code to read from the reporting db.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
R

Rod Gill

Open any of the Views with names ending with _userview and scroll to the
last columns. All enterprise custom fields are there (assuming this is
Project Server 2007?)

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top