CustomFields.ReadCustomFieldsByEntity Method

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

Namespace:  WebSvcCustomFields
Assembly:  ProjectServerWebServices (in ProjectServerWebServices.dll)

Syntax

'Declaration
<SoapDocumentMethodAttribute("http://schemas.microsoft.com/office/project/server/webservices/CustomFields/ReadCustomFieldsByEntity", RequestNamespace := "http://schemas.microsoft.com/office/project/server/webservices/CustomFields/",  _
    ResponseNamespace := "http://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("http://schemas.microsoft.com/office/project/server/webservices/CustomFields/ReadCustomFieldsByEntity", RequestNamespace = "http://schemas.microsoft.com/office/project/server/webservices/CustomFields/", 
    ResponseNamespace = "http://schemas.microsoft.com/office/project/server/webservices/CustomFields/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public CustomFieldDataSet ReadCustomFieldsByEntity(
    Guid entityUid
)

Parameters

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

Return Value

Type: WebSvcCustomFields.CustomFieldDataSet
The CustomFieldDataSet contains all custom field data for the project, resource, or task 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.

Project Server Permissions

Permission

Description

CreateNewProposalOrActivity

Create a new proposal. Global permission.

LogOnToProjectServerFromProjectProfessional

Connect to the Project Server database from Project Professional. Global permission.

ManageEnterpriseCustomFields

Modify the definitions of enterprise custom fields and lookup table values. Global permission.

ManageUsersAndGroups

Manage Project Server users and groups. Global permission.

ViewResourceCenter

View resource allocation data. Global permission.

Examples

The following code fragment returns a CustomFieldDataSet with all of the CustomFieldDataSet.CustomFieldsRow objects for resource custom fields. WebSvcCustomFields 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

WebSvcCustomFields Namespace