Share via


EnterpriseResource class

inherits members from ClientObject

Represents a resource that is managed by Project Service in a project.

Syntax

CSOM

class EnterpriseResource 

JSOM

PS.EnterpriseResource

REST Interface

Supported.

PS.EnterpriseResource

http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/EnterpriseResources('{resourceid}')

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

Name .NET JSOM REST Type Description
[] ✓ʷ Dictionary<string, Object> Gets or sets an item in the enterprise resource.
Assignments StatusAssignmentCollection Gets a collection of status assignments for an enterprise resource.
BaseCalendar ✓ʷ ✓ʷ ✓ʷ Calendar Gets or sets a base calendar for an enterprise resource.
CanLevel ✓ʷ ✓ʷ ✓ʷ Boolean Gets or sets a value that indicates whether resource leveling can be performed on an enterprise resource.
Code ✓ʷ ✓ʷ ✓ʷ String Gets or sets any code, abbreviation, or number that is entered as part of the information about an enterprise resource.
CostAccrual ✓ʷ ✓ʷ ✓ʷ AccrueAt Gets or sets a value that represents how and when to charge enterprise resource costs to the cost of a task.
CostCenter ✓ʷ ✓ʷ ✓ʷ String Gets or sets any code, abbreviation, or number that is entered as cost center information for an enterprise resource.
CostRateTables EnterpriseResourceCostRateTableCollection Returns the collection of cost rate tables for the resource.
Created DateTime Gets the date and time when an enterprise resource was added to the project.
CustomFields CustomFieldCollection Gets a collection of custom fields that have values set for an enterprise resource.
DefaultAssignmentOwner ✓ʷ ✓ʷ ✓ʷ SPUser Gets the default name that is entered into the Assignment Owner field when an enterprise resource is assigned to a task.
DefaultBookingType ✓ʷ ✓ʷ ✓ʷ BookingType Gets or sets the default booking type for an enterprise resource.
Email ✓ʷ ✓ʷ ✓ʷ String Gets or sets the email address of an enterprise resource.
Engagements ResourceEngagementCollection
ExternalId ✓ʷ ✓ʷ ✓ʷ String Gets or sets any code, abbreviation, or number that is entered as an external identifier for an enterprise resource.
FieldValues Dictionary<string, Object> Gets the collection of custom fields that have values set for the enterprise resource.
Group ✓ʷ ✓ʷ ✓ʷ String Gets or sets the name of a group to which an enterprise resource belongs.
HireDate ✓ʷ ✓ʷ ✓ʷ DateTime Gets or sets the date and time of hire for an enterprise resource.
Id Guid Gets the object identifier as a GUID.
Initials ✓ʷ ✓ʷ ✓ʷ String Gets or sets the abbreviation for the name of an enterprise resource.
IsActive ✓ʷ ✓ʷ ✓ʷ Boolean Gets or sets a value that indicates whether an enterprise resource has been made active or inactive.
IsBudget Boolean Gets a Boolean value that indicates whether an enterprise resource is a budget resource.
IsCheckedOut Boolean Gets a value that indicates whether enterprise resource assignment data is currently available for updating or modification, or whether the enterprise resource is checked out.
IsGeneric Boolean Gets a Boolean value that indicates whether an enterprise resource is generic.
IsTeam Boolean Gets a Boolean value that indicates whether a resource is in a team assignment pool.
Item ✓ʷ Dictionary<string, Object> Gets or sets an item in the enterprise resource.
MaterialLabel ✓ʷ ✓ʷ ✓ʷ String Gets or sets the unit of measure that is entered for supplies or other consumable items that are used to complete tasks in a project.
Modified DateTime Gets the modified date and time.
Name ✓ʷ ✓ʷ ✓ʷ String Gets or sets the name of an enterprise resource.
Phonetics ✓ʷ ✓ʷ ✓ʷ String Gets or sets phonetic information for resource names in either the Japanese Hiragana writing system or the Katakana writing system.
RequiresEngagements ✓ʷ ✓ʷ ✓ʷ Boolean
ResourceCalendarExceptions CalendarExceptionCollection Gets a collection of exceptions to the base calendar that are specific to an enterprise resource.
ResourceType EnterpriseResourceType Gets an enumerated value that represents the type of an enterprise resource.
Self EnterpriseResource Gets the currently logged-on user.
TerminationDate ✓ʷ ✓ʷ ✓ʷ DateTime Gets or sets the date and time after which the resource can no longer be used.
TimesheetManager ✓ʷ ✓ʷ ✓ʷ SPUser Gets the manager who reviews and approves the timesheet of an enterprise resource.
User ✓ʷ ✓ʷ ✓ʷ SPUser Gets the SharePoint user that is linked to the Enterprise Resource.

Methods

Name .NET JSOM REST Return Type Description
DeleteObject() void Deletes the enterprise resource object.
ForceCheckIn() void Forces a project to be checked in after it is left in a state of being checked out following the interruption or unexpected closing of Project Server.
getSelf(ClientRuntimeContext context) EnterpriseResource Gets the currently logged-on user.
SetCustomFieldValue(String fieldName, Object value) void Sets a custom field on the enterprise resource.

#### Method Details

DeleteObject()

Deletes the enterprise resource object.

Syntax
void DeleteObject()
Parameters

None

Return Value

void

ForceCheckIn()

Forces a project to be checked in after it is left in a state of being checked out following the interruption or unexpected closing of Project Server.

Syntax
void ForceCheckIn()
Parameters

None

Return Value

void

GetSelf(ClientRuntimeContext context)

Gets the currently logged-on user.

Syntax

GetSelf(ClientRuntimeContext context)

Parameters

Name Type Description
context ClientRuntimeContext The current client runtime context, example ProjectContext.

Return Value

EnterpriseResource
The EnterpriseResource who is currently logged on.

SetCustomFieldValue(String fieldName, Object value)

Sets a custom field on the enterprise 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

Remarks

Enterprise resources are usually part of an organization's entire list of resources and can be shared across projects.

See Also

DraftProjectResourceCollection
Engagement
EnterpriseResourceCostRateTableCollection
EnterpriseResourceCollection
EnterpriseResourceCollection
EnterpriseResourceCreationInformation
PlanAssignment
ProjectEngagementCreationInformation
ProjectResource
SPUser
StatusAssignment