CustomFields.ReadCustomFieldsByEntity Method

Gets all of the enterprise custom fields for the specified entity (project, resource, or task).

Namespace:  [CustomFields Web service]
Service reference: http://ServerName:32843/[Project Service Application GUID]/PSI/CustomFields.svc
Web service reference: http://ServerName/ProjectServerName/_vti_bin/PSI/CustomFields.asmx?wsdl

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/CustomFields/ReadCustomFieldsByEntity", RequestNamespace := "https://schemas.microsoft.com/office/project/server/webservices/CustomFields/",  _
    ResponseNamespace := "https://schemas.microsoft.com/office/project/server/webservices/CustomFields/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function ReadCustomFieldsByEntity ( _
    entityUid As Guid _
) As CustomFieldDataSet
'Usage
Dim instance As CustomFields
Dim entityUid As Guid
Dim returnValue As CustomFieldDataSet

returnValue = instance.ReadCustomFieldsByEntity(entityUid)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/CustomFields/ReadCustomFieldsByEntity", RequestNamespace = "https://schemas.microsoft.com/office/project/server/webservices/CustomFields/", 
    ResponseNamespace = "https://schemas.microsoft.com/office/project/server/webservices/CustomFields/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public CustomFieldDataSet ReadCustomFieldsByEntity(
    Guid entityUid
)

Parameters

  • entityUid
    Type: System.Guid
    The GUID of the custom field project, resource, or task entity.

Return Value

Type: [CustomFields Web service].CustomFieldDataSet
The CustomFieldDataSet contains all custom field data for the project, resource, or task that is specified by the entityUid parameter.

Remarks

To get all of the resource custom fields, for example, use the resource entity GUID from the EntityCollection.Entities property in the Microsoft.Office.Project.Server.Library assembly.

Tip

The ReadCustomFieldsByEntity method ignores the locale setting of the computer running Project Server. The ReadCustomFieldsByEntity2(Guid) method returns locale-dependent values for formulas that calculate custom fields and graphical indicators.

Project Server Permissions

Permission

Description

LogOnToProjectServerFromProjectProfessional

Allows a user to connect to the Project Server database from Project Professional. Global permission.

ManageEnterpriseCustomFields

Allows a user to modify the definitions of enterprise custom fields and lookup table values. Global permission.

ManageUsersAndGroups

Allows a user to manage Project Server users and groups. Global permission.

NewProject

Allows a user to create a project. Global permission.

ViewResourceCenter

Allows a user to view resource allocation data. Global permission.

ManageWorkflow

Allows the user to manage workflows. Global permission.

Examples

The following code fragment returns a CustomFieldDataSet with all of the CustomFieldDataSet.CustomFieldsRow objects for resource custom fields. [CustomFields Web service] is the arbitrary name of a reference to the CustomFields.asmx web service.

using PSLibrary = Microsoft.Office.Project.Server.Library;
. . .
public static WebSvcCustomFields.CustomFields customFields =
    new WebSvcCustomFields.CustomFields();
. . .
string resourceEntity = PSLibrary.EntityCollection.Entities.ResourceEntity.UniqueId;

WebSvcCustomFields.CustomFieldDataSet cfDs = customFields.ReadCustomFieldsByEntity(
    new Guid(resourceEntity));
. . .

See Also

Reference

CustomFields Class

CustomFields Members

CustomFields Web Service

ReadCustomFieldsByEntity2(Guid)