Export (0) Print
Expand All

CustomFields.ReadCustomFieldsByEntity Method

Office 2007

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

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

[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.

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.

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));
. . .

Community Additions

ADD
Show:
© 2014 Microsoft