CustomFields.ReadCustomFieldsByEntity(Guid) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets all of the enterprise custom fields for the specified entity (project, resource, or task).
public:
WebSvcCustomFields::CustomFieldDataSet ^ ReadCustomFieldsByEntity(Guid entityUid);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/office/project/server/webservices/CustomFields/ReadCustomFieldsByEntity", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/office/project/server/webservices/CustomFields/", ResponseNamespace="http://schemas.microsoft.com/office/project/server/webservices/CustomFields/", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
public WebSvcCustomFields.CustomFieldDataSet ReadCustomFieldsByEntity(Guid entityUid);
member this.ReadCustomFieldsByEntity : Guid -> WebSvcCustomFields.CustomFieldDataSet
Public Function ReadCustomFieldsByEntity (entityUid As Guid) As CustomFieldDataSet
Parameters
- entityUid
- Guid
The GUID of the custom field project, resource, or task entity.
Returns
The CustomFieldDataSet contains all custom field data for the project, resource, or task that is specified by the entityUid parameter.
- Attributes
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));
. . .
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
| 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. |