DraftTaskCollection class

inherits members from ClientObjectCollection

Represents a collection of DraftTask objects.

Syntax

CSOM

class DraftTaskCollection 

JSOM

PS.DraftTaskCollection

REST Interface

Supported.

PS.DraftTaskCollection

http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/Projects('{projectid}')/Draft/Tasks

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

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

Methods

Name .NET JSOM REST Return Type Description
'{DraftTaskId}' DraftTask Gets a DraftTask from the collection with the specified DraftTaskId.
Add(TaskCreationInformation parameters) DraftTask Adds the DraftTask that is specified by the TaskCreationInformation object to the collection.
GetByGuid(Guid uid) DraftTask Gets a DraftTask from the collection with the Guid value.
GetById(String objectId) DraftTask Gets a DraftTask from the collection with the Id value.
Remove(DraftTask task) Boolean Removes the specified DraftTask from the collection.


Method Details

'{DraftTaskId}'

Gets a DraftTask from the collection with the specified DraftTaskId.

Syntax
DraftTask http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/Projects('{projectid}')/Draft/Tasks('{DraftTaskId}')
Parameters
Name Type Description
DraftTaskId String the id of the DraftTask
Return Value

DraftTask

Add(TaskCreationInformation parameters)

Adds the DraftTask that is specified by the TaskCreationInformation object to the collection.

Syntax
DraftTask Add(TaskCreationInformation parameters)
Parameters
Name Type Description
parameters TaskCreationInformation The properties that can be set when creating a draft task.
Return Value

DraftTask

GetByGuid(Guid uid)

Gets a DraftTask from the collection with the Guid value.

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

DraftTask

GetById(String objectId)

Gets a DraftTask from the collection with the Id value.

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

DraftTask

Remove(DraftTask task)

Removes the specified DraftTask from the collection.

Syntax
Boolean Remove(DraftTask task)
Parameters
Name Type Description
task DraftTask The DraftTask to remove.
Return Value

Boolean

See Also

DraftProject
DraftTask
TaskCreationInformation