vstoms-projectms-project-server-2013ms-project-server-2010ms-project-server-2016

Is There a way to get a List of all the Enterprise Fields a user on Project Server has In Use?


I'm building a MS Project VSTO tool (written in C#) that in many instances needs to either read or write data from a field in MS Project. Since I don't always know what field will contain the data I need, I many times need to allow the user the option to select the field they want. Getting all the basic fields is easy, my issue arises if a user is in a Project Server environment and using Enterprise fields. So my question is 2 fold:

  1. Is there a way to check if the user is in a Project Server environment?
  2. Is there a way to easily get all of the custom enterprise fields that are being used in MS Project? I'd like to be able to capture these fields in a collection like a list or array.

Solution

  • Is there a way to check if the user is in a Project Server environment?

    Look at the collection of Profiles to see if there is a project server one and check its ConnectionState to see if it's connected to a project server.

    Is there a way to easily get all of the custom enterprise fields that are being used in MS Project? I'd like to be able to capture these fields in a collection like a list or array.

    If you have access to the project server, take a look at this page, Accessing Project Online enterprise custom fields. Without access to the server I suggest: