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

DraftTaskCollection class

Nadin Merali|Last Updated: 5/6/2017

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.NETJSOMRESTTypeDescription
[Integer]DraftTaskGets a DraftTask from the collection at the specified index.
ItemDraftTaskGets a DraftTask from the collection at the specified index.

Methods

Name.NETJSOMRESTReturn TypeDescription
'{DraftTaskId}'DraftTaskGets a DraftTask from the collection with the specified DraftTaskId.
Add(TaskCreationInformation parameters)DraftTaskAdds the DraftTask that is specified by the TaskCreationInformation object to the collection.
GetByGuid(Guid uid)DraftTaskGets a DraftTask from the collection with the Id value.
GetById(String objectId)DraftTaskGets a DraftTask from the collection with the Guid value.
Remove(DraftTask task)BooleanRemoves 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
NameTypeDescription
DraftTaskIdStringthe 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
NameTypeDescription
parametersTaskCreationInformationThe properties that can be set when creating a draft task.
Return Value

DraftTask

GetByGuid(Guid uid)

Gets a DraftTask from the collection with the Id value.

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

DraftTask

GetById(String objectId)

Gets a DraftTask from the collection with the Guid value.

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

DraftTask

Remove(DraftTask task)

Removes the specified DraftTask from the collection.

Syntax
Boolean Remove(DraftTask task)
Parameters
NameTypeDescription
taskDraftTaskThe DraftTask to remove.
Return Value

Boolean

See Also

DraftProject
DraftTask
TaskCreationInformation

© 2018 Microsoft