Table of contents
API
TOC
Collapse the table of content
Expand the table of content

CustomFieldCollection class

Nadin Merali|Last Updated: 5/6/2017

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.NETJSOMRESTTypeDescription
[Integer]CustomFieldGets a CustomField from the collection at the specified index.
ItemCustomFieldGets a CustomField from the collection at the specified index.

Methods

Name.NETJSOMRESTReturn TypeDescription
'{CustomFieldId}'CustomFieldGets a CustomField from the collection with the specified CustomFieldId.
Add(CustomFieldCreationInformation parameters)CustomFieldAdds the CustomField that is specified by the CustomFieldCreationInformation object to the collection.
GetByAppAlternateId(String objectId)CustomFieldGets 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)CustomFieldGets a CustomField from the collection with the Id value.
GetById(String objectId)CustomFieldGets a CustomField from the collection with the Guid value.
Remove(CustomField field)BooleanRemoves the specified CustomField from the collection.
Update()voidUpdates 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
NameTypeDescription
CustomFieldIdStringthe 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
NameTypeDescription
parametersCustomFieldCreationInformationThe 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
NameTypeDescription
objectIdStringThe alternate custom field GUID.
Return Value

CustomField

GetByGuid(Guid uid)

Gets a CustomField from the collection with the Id value.

Syntax
CustomField GetByGuid(Guid uid)
Parameters
NameTypeDescription
uidGuidThe Guid of the CustomField
Return Value

CustomField

GetById(String objectId)

Gets a CustomField from the collection with the Guid value.

Syntax
CustomField GetById(String objectId)
Parameters
NameTypeDescription
objectIdStringThe id of the CustomField.
Return Value

CustomField

Remove(CustomField field)

Removes the specified CustomField from the collection.

Syntax
Boolean Remove(CustomField field)
Parameters
NameTypeDescription
fieldCustomFieldThe 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

© 2018 Microsoft