CustomFieldCollection class

inherits members from ClientObjectCollection

Represents a collection of CustomField objects.

Syntax

CSOM

class CustomFieldCollection 

JSOM

PS.CustomFieldCollection

REST Interface

Supported.

PS.CustomFieldCollection

http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/CustomFields

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

Name .NET JSOM REST Type Description
[Integer] CustomField Gets a CustomField from the collection at the specified index.
Item CustomField Gets a CustomField from the collection at the specified index.

Methods

Name .NET JSOM REST Return Type Description
'{CustomFieldId}' CustomField Gets a CustomField from the collection with the specified CustomFieldId.
Add(CustomFieldCreationInformation parameters) CustomField Adds the CustomField that is specified by the CustomFieldCreationInformation object to the collection.
GetByAppAlternateId(String objectId) CustomField Gets a custom field from the collection by using the alternate custom field GUID that is specified in an App package for Project Online.
GetByGuid(Guid uid) CustomField Gets a CustomField from the collection with the Guid value.
GetById(String objectId) CustomField Gets a CustomField from the collection with the Id value.
Remove(CustomField field) Boolean Removes the specified CustomField from the collection.
Update() void Updates the custom field collection.

#### Method Details

'{CustomFieldId}'

Gets a CustomField from the collection with the specified CustomFieldId.

Syntax
CustomField http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/CustomFields('{CustomFieldId}')
Parameters
Name Type Description
CustomFieldId String the id of the CustomField
Return Value

CustomField

Add(CustomFieldCreationInformation parameters)

Adds the CustomField that is specified by the CustomFieldCreationInformation object to the collection.

Syntax
CustomField Add(CustomFieldCreationInformation parameters)
Parameters
Name Type Description
parameters CustomFieldCreationInformation The properties that can be set when creating a custom field.
Return Value

CustomField

GetByAppAlternateId(String objectId)

Gets a custom field from the collection by using the alternate custom field GUID that is specified in an App package for Project Online.

Syntax
CustomField GetByAppAlternateId(String objectId)
Parameters
Name Type Description
objectId String The alternate custom field GUID.
Return Value

CustomField

GetByGuid(Guid uid)

Gets a CustomField from the collection with the Guid value.

Syntax
CustomField GetByGuid(Guid uid)
Parameters
Name Type Description
uid Guid The Guid of the CustomField
Return Value

CustomField

GetById(String objectId)

Gets a CustomField from the collection with the Id value.

Syntax
CustomField GetById(String objectId)
Parameters
Name Type Description
objectId String The id of the CustomField.
Return Value

CustomField

Remove(CustomField field)

Removes the specified CustomField from the collection.

Syntax
Boolean Remove(CustomField field)
Parameters
Name Type Description
field CustomField The CustomField to remove.
Return Value

Boolean

Update()

Updates the custom field collection.

Syntax
void Update()
Parameters

None

Return Value

void

See Also

Assignment
CustomField
CustomFieldCreationInformation
EnterpriseResource
PlanAssignment
Project
ProjectContext
ProjectResource
StatusAssignment
StatusTask
Task