Share via


PhaseCollection class

inherits members from ClientObjectCollection

Represents a collection of workflow Phase objects.

Syntax

CSOM

class PhaseCollection 

JSOM

PS.PhaseCollection

REST Interface

Supported.

PS.PhaseCollection

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

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

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

Methods

Name .NET JSOM REST Return Type Description
'{PhaseId}' Phase Gets a Phase from the collection with the specified PhaseId.
Add(PhaseCreationInformation parameters) Phase Adds the Phase that is specified by the PhaseCreationInformation object to the collection.
GetByGuid(Guid uid) Phase Gets a Phase from the collection with the Guid value.
GetById(String objectId) Phase Gets a Phase from the collection with the Id value.
Remove(Phase phase) Boolean Removes the specified Phase from the collection.
Update() void Updates the phase collection.

#### Method Details

'{PhaseId}'

Gets a Phase from the collection with the specified PhaseId.

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

Phase

Add(PhaseCreationInformation parameters)

Adds the Phase that is specified by the PhaseCreationInformation object to the collection.

Syntax
Phase Add(PhaseCreationInformation parameters)
Parameters
Name Type Description
parameters PhaseCreationInformation The properties that can be set when creating a phase.
Return Value

Phase

GetByGuid(Guid uid)

Gets a Phase from the collection with the Guid value.

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

Phase

GetById(String objectId)

Gets a Phase from the collection with the Id value.

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

Phase

Remove(Phase phase)

Removes the specified Phase from the collection.

Syntax
Boolean Remove(Phase phase)
Parameters
Name Type Description
phase Phase The Phase to remove.
Return Value

Boolean

Update()

Updates the phase collection.

Syntax
void Update()
Parameters

None

Return Value

void

See Also

Phase
PhaseCreationInformation
ProjectContext