Share via


DraftProjectResource class

inherits members from ProjectResource

Represents an enterprise resource in a checked-out project. A resource can be a work resource, a material resource, or a cost resource.

Syntax

CSOM

class DraftProjectResource 

JSOM

PS.DraftProjectResource

REST Interface

This resource supports GET, POST, PUT, PATCH, MERGE, and DELETE HTTP commands.

PS.DraftProjectResource

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

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

Name .NET JSOM REST Type Description
[] ✓ʷ Dictionary<string, Object> Gets or sets an item in the draft project resource.
Assignments DraftAssignmentCollection Gets the assignments that are associated with the resource.
CanLevel ✓ʷ ✓ʷ ✓ʷ Boolean Gets or sets a value that indicates whether resource leveling can be performed on the resource.
Code ✓ʷ ✓ʷ ✓ʷ String Gets or sets any code, abbreviation, or number that is entered as part of the information about the resource.
CostAccrual ✓ʷ ✓ʷ ✓ʷ AccrueAt Gets or sets a value that represents how and when to charge resource costs to the cost of a task.
CostCenter ✓ʷ ✓ʷ ✓ʷ String Gets or sets any code, abbreviation, or number that has been entered as part of the information about the resource.
CostPerUse ✓ʷ ✓ʷ ✓ʷ Double Gets or sets the cost per use of the resource.
DefaultAssignmentOwner ✓ʷ ✓ʷ ✓ʷ SPUser Gets or sets the default assignment owner.
DefaultBookingType ✓ʷ ✓ʷ ✓ʷ BookingType Gets or sets the default booking type for the resource.
Email ✓ʷ ✓ʷ ✓ʷ String Gets or sets the email address of the resource.
FieldValues Dictionary<string, Object> Gets the collection of custom fields that have values set for the draft project resource.
Group ✓ʷ ✓ʷ ✓ʷ String Gets or sets the name of a group to which a project resource belongs.
Initials ✓ʷ ✓ʷ ✓ʷ String Gets or sets the short name for the resource.
Item ✓ʷ Dictionary<string, Object> Gets or sets an item in the draft project resource.
MaterialLabel ✓ʷ ✓ʷ ✓ʷ String Gets or sets the unit of measure for supplies or other consumable items that are used in a project.
MaximumCapacity ✓ʷ ✓ʷ ✓ʷ Double Gets or sets the percentage, or the number of units, that represent the maximum capacity for which the resource is available during the current time period.
Name ✓ʷ ✓ʷ ✓ʷ String Gets or sets the name of the project resource.
OvertimeRate ✓ʷ ✓ʷ ✓ʷ Double Gets or sets the hourly rate of pay for overtime for the resource.
OvertimeRateUnits ✓ʷ ✓ʷ ✓ʷ OvertimeRateFormat Gets or sets the rate description format in which the overtime rate is displayed.
Phonetics ✓ʷ ✓ʷ ✓ʷ String Gets or sets phonetic information in either the Japanese Hiragana writing system or the Katakana writing system for resource names.
StandardRate ✓ʷ ✓ʷ ✓ʷ Double Gets or sets the rate of pay per hour for regular, non-overtime work that is performed by the resource.
StandardRateUnits ✓ʷ ✓ʷ ✓ʷ StandardRateFormat Gets or sets the rate description format in which the standard rate is displayed.

Methods

Name .NET JSOM REST Return Type Description
DeleteObject() void Deletes the draft project resource object.
SetCustomFieldValue(String fieldName, Object value) void Sets a custom field on the draft project resource.

#### Method Details

DeleteObject()

Deletes the draft project resource object.

Syntax
void DeleteObject()
Parameters

None

Return Value

void

SetCustomFieldValue(String fieldName, Object value)

Sets a custom field on the draft project resource.

Syntax
void SetCustomFieldValue(String fieldName, Object value)
Parameters
Name Type Description
fieldName String The InternalName of the custom field to update.
value Object New value of the custom field.
Return Value

void

See Also

DraftAssignment
DraftProjectResourceCollection
ProjectResourceCreationInformation
SPUser