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

DraftProjectResourceCollection class

Nadin Merali|Last Updated: 5/6/2017

inherits members from ClientObjectCollection

Represents a collection of DraftProjectResource objects.

Syntax

CSOM

class DraftProjectResourceCollection 

JSOM

PS.DraftProjectResourceCollection

REST Interface

Supported.

PS.DraftProjectResourceCollection

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

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

Name.NETJSOMRESTTypeDescription
[Integer]DraftProjectResourceGets a DraftProjectResource from the collection at the specified index.
ItemDraftProjectResourceGets a DraftProjectResource from the collection at the specified index.

Methods

Name.NETJSOMRESTReturn TypeDescription
'{DraftProjectResourceId}'DraftProjectResourceGets a DraftProjectResource from the collection with the specified DraftProjectResourceId.
Add(ProjectResourceCreationInformation parameters)DraftProjectResourceAdds the DraftProjectResource that is specified by the ProjectResourceCreationInformation object to the collection.
AddEnterpriseResource(EnterpriseResource resource)DraftProjectResourceAdds an existing enterprise resource to the draft project resource collection.
AddEnterpriseResourceById(Guid resourceId)QueueJobAdds an existing enterprise resource with the specified Id value to the draft project resource collection.
GetByGuid(Guid uid)DraftProjectResourceGets a DraftProjectResource from the collection with the Id value.
GetById(String objectId)DraftProjectResourceGets a DraftProjectResource from the collection with the Guid value.
Remove(DraftProjectResource resource)BooleanRemoves the specified DraftProjectResource from the collection.


Method Details

'{DraftProjectResourceId}'

Gets a DraftProjectResource from the collection with the specified DraftProjectResourceId.

Syntax
DraftProjectResource http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/Projects('{projectid}')/Draft/ProjectResources('{DraftProjectResourceId}')
Parameters
NameTypeDescription
DraftProjectResourceIdStringthe id of the DraftProjectResource
Return Value

DraftProjectResource

Add(ProjectResourceCreationInformation parameters)

Adds the DraftProjectResource that is specified by the ProjectResourceCreationInformation object to the collection.

Syntax
DraftProjectResource Add(ProjectResourceCreationInformation parameters)
Parameters
NameTypeDescription
parametersProjectResourceCreationInformationThe properties that can be set when creating a draft project resource.
Return Value

DraftProjectResource

AddEnterpriseResource(EnterpriseResource resource)

Adds an existing enterprise resource to the draft project resource collection.

Syntax
DraftProjectResource AddEnterpriseResource(EnterpriseResource resource)
Parameters
NameTypeDescription
resourceEnterpriseResourceThe enterprise resource to add.
Return Value

DraftProjectResource

AddEnterpriseResourceById(Guid resourceId)

Adds an existing enterprise resource specified by the Guid to the draft project resource collection.

Syntax
QueueJob AddEnterpriseResourceById(Guid resourceId)
Parameters
NameTypeDescription
resourceIdGuidThe guid of the enterprise resource to add to the collection.
Return Value

QueueJob
The QueueJob includes the JobState property that identifies the result of the AddEnterpriseResource request.

GetByGuid(Guid uid)

Gets a DraftProjectResource from the collection with the Id value.

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

DraftProjectResource

GetById(String objectId)

Gets a DraftProjectResource from the collection with the Guid value.

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

DraftProjectResource

Remove(DraftProjectResource resource)

Removes the specified DraftProjectResource from the collection.

Syntax
Boolean Remove(DraftProjectResource resource)
Parameters
NameTypeDescription
resourceDraftProjectResourceThe DraftProjectResource to remove.
Return Value

Boolean

See Also

DraftProject
DraftProjectResource
ProjectResourceCreationInformation

© 2018 Microsoft