EntityCollection.AssignmentEntity Property
Contains metadata for the assignment entity type.
Namespace: Microsoft.Office.Project.Server.Library
Assembly: Microsoft.Office.Project.Server.Library (in Microsoft.Office.Project.Server.Library.dll)
Syntax
'Declaration
Public ReadOnly Property AssignmentEntity As Entity
Get
'Usage
Dim instance As EntityCollection
Dim value As Entity
value = instance.AssignmentEntity
public Entity AssignmentEntity { get; }
Property Value
Type: Microsoft.Office.Project.Server.Library.Entity
Remarks
Use EntityCollection.Entities.AssignmentEntity.UniqueId to obtain the GUID of the assignment entity for use in PSI methods.
Examples
The following code fragment uses the assignment entity GUID in order to get all of the assignment custom fields with the ReadCustomFieldsByEntity method. 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 assignmentEntity = PSLibrary.EntityCollection.Entities.AssignmentEntity.UniqueId;
WebSvcCustomFields.CustomFieldDataSet cfDs = customFields.ReadCustomFieldsByEntity(
new Guid(assignmentEntity));
. . .