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

Project class

Nadin Merali|Last Updated: 5/6/2017

inherits members from ClientObject

Contains the common properties for draft projects and published projects.

Syntax

CSOM

class Project 

JSOM

PS.Project

REST Interface

Supported.

PS.Project

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

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

Name.NETJSOMRESTTypeDescription
ApprovedEndDateTimeGets the approved end date in the project portfolio planner.
ApprovedStartDateTimeGets the approved start date in the project portfolio planner.
CalculateActualCostsBooleanGets a value that indicates whether the project automatically calculates actual and remaining work and costs.
CalculatesActualCostsBooleanGets a value that indicates whether the project always calculates actual costs.
CheckedOutBySPUserGets the user who has the project checked out.
CheckedOutDateDateTimeGets the date when project was checked out.
CheckOutDescriptionStringGets the description of the current checkout action for the project.
CheckOutIdGuidGets the session GUID that is associated with the current check out.
CreatedDateDateTimeGets the date when the project was created.
CriticalSlackLimitIntegerGets the date when the project was created.
CustomFieldsCustomFieldCollectionGets the collection of project custom fields that have values set for the project.
DefaultFinishTimeDateTimeGets the default end time of a working day.
DefaultOvertimeRateUnitsOvertimeRateFormatGets the time unit for the default overtime rate.
DefaultStandardRateUnitsStandardRateFormatGets the time unit for the default standard rate.
DefaultStartTimeDateTimeGets the default start time of a working day.
EngagementsProjectEngagementCollectionReturns the engagements for this project.
EnterpriseProjectTypeEnterpriseProjectTypeGets the enterprise project type (EPT) for the project.
HasMppPendingImportBooleanGets a value that indicates whether there is an mpp file waiting to be imported.
HonorConstraintsBooleanGets a value that indicates whether scheduling constraints take precedence over dependencies.
IdGuidGets the GUID of the project.
IsCheckedOutBooleanGets a value that indicates whether the project is checked out.
LastPublishedDateDateTimeGets the most recent date when the project was published.
LastSavedDateDateTimeGets the most recent date when the project was saved.
ListId✓ʷGuidList Id on the web that the project was created from.
MoveActualIfLaterBooleanGets a value that indicates whether to move the end date of completed parts forward to the status date, if the actual end date falls before the status date.
MoveActualToStatusBooleanGets a value that indicates whether to move the end date of completed parts back to the status date, if the actual end data falls after the status date.
MoveRemainingIfEarlierBooleanGets a value that indicates whether to move the start date of remaining parts forward to the status date, if the actual start date falls before the status date.
MoveRemainingToStatusBooleanGets a value that indicates whether to move the start date of the remaining parts back to the status date, if the actual start date falls after the status date.
MultipleCriticalPathsBoolean
OptimizerDecisionCommittedDecisionResultGets the result of the Optimizer in a project portfolio analysis.
PercentCompleteIntegerGets the percentage complete of the project summary task.
PhasePhaseGets the current workflow phase of the project.
PlannerDecisionCommittedDecisionResultGets the result of the Planner in a project portfolio analysis.
ProjectSiteUrlStringGets the URL of the project site.
ProjectSummaryTaskProjectSummaryTaskGets the summary task that represents the entire project.
ProjectTypeProjectTypeGets the type of project (standard project, template, master project, or subproject).
QueueJobsQueueJobCollectionGets the collection of Project Server Queue Service jobs that are associated with the project.
ScheduledFromStartBooleanGets whether the project is scheduled from the finish date instead of the start date.
SplitInProgressBooleanGets a value that indicates whether to split tasks that are in progress.
SpreadActualCostsToStatusBooleanGets a value that indicates whether actual costs are spread to the status date or to the stop date.
SpreadPercentCompleteToStatusBooleanGets a value that indicates whether the percentage complete consideration period is spread to the status date or to the task finish date.
StageStageGets the current workflow stage of the project.
SummaryTaskIdGuidGets the GUID for the hidden project summary task.
TaskListIdGuidGets the GUID of the project's task list.
WebId✓ʷGuidThe Id of the web that contains the list where the project was created from. (Ideation Scenario)

Methods

Name.NETJSOMRESTReturn TypeDescription
EnterProjectStage(Stage stage)voidSwitches the project to the specified stage in a Project Server workflow.
GetResourcePlan(DateTime start, DateTime end, TimeScale timeScale)ResourcePlanGets resource plan data for a project by filtering project data with date range and timescale parameters.
GetResourcePlanByUrl(String start, String end, String scale)ResourcePlanGets resource plan data for a project by filtering project data with date range and timescale parameters.
LeaveProjectStage()voidSets the project complete and leaves the current workflow stage.
ReadyToLeaveProjectStage()ReadyToLeaveProjectStageValueChecks whether the current workflow stage requirements are met and the project is ready to move to the next stage.
SetCustomFieldValue(String fieldName, Object value)voidSets a custom field on the project.
UpdateIdeaListItemStatus(String status)voidUpdates the Project Server Status column in the idea list with a status message.
UpdateProjectStageStatus(Stage stage, String statusInformation, UpdateProjectStageStatusFieldValue stageStatusValue, Boolean append)voidUpdates the status of a workflow stage for the project.


Method Details

EnterProjectStage(Stage stage)

Switches the project to the specified stage in a Project Server workflow.

Syntax
void EnterProjectStage(Stage stage)
Parameters
NameTypeDescription
stageStageThe workflow stage.
Return Value

void

GetResourcePlan(DateTime start, DateTime end, TimeScale timeScale)

Gets resource plan data for a project by filtering project data with date range and timescale parameters.

Syntax
ResourcePlan GetResourcePlan(DateTime start, DateTime end, TimeScale timeScale)
Parameters
NameTypeDescription
startDateTimeThe start date for the resource plan data.
endDateTimeThe end date for the resource plan data.
timeScaleTimeScaleAn enumeration that represents a time scale (for example, days or weeks).
Return Value

ResourcePlan

GetResourcePlanByUrl(String start, String end, String scale)

Gets resource plan data for a project by filtering project data with date range and timescale parameters.

Syntax
ResourcePlan GetResourcePlanByUrl(String start, String end, String scale)
Parameters
NameTypeDescription
startStringThe start date for the resource plan data.
endStringThe end date for the resource plan data.
scaleStringAn enumeration that represents a time scale (for example, days or weeks). See TimeScale
Return Value

ResourcePlan
A resource plan.

Remarks

A resource plan provides a way to estimate corporate resource capacity when some projects are in full execution and others are still in the proposal phase or planning phase.

LeaveProjectStage()

Sets the project complete and leaves the current workflow stage.

Syntax
void LeaveProjectStage()
Parameters

None

Return Value

void

ReadyToLeaveProjectStage()

Checks whether the current workflow stage requirements are met and the project is ready to move to the next stage.

Syntax
ReadyToLeaveProjectStageValue ReadyToLeaveProjectStage()
Parameters

None

Return Value

ReadyToLeaveProjectStageValue
A collection of enumeration constants that describe which of the requirements are not met.

SetCustomFieldValue(String fieldName, Object value)

Sets a custom field on the project.

Syntax
void SetCustomFieldValue(String fieldName, Object value)
Parameters
NameTypeDescription
fieldNameStringThe InternalName of the custom field to update.
valueObjectNew value of the custom field.
Return Value

void

UpdateIdeaListItemStatus(String status)

Updates the Project Server Status column in the idea list with a status message.

Syntax
void UpdateIdeaListItemStatus(String status)
Parameters
NameTypeDescription
statusStringThe project status message.
Return Value

void

UpdateProjectStageStatus(Stage stage, String statusInformation, UpdateProjectStageStatusFieldValue stageStatusValue, Boolean append)

Updates the status of a workflow stage for the project.

Syntax
void UpdateProjectStageStatus(Stage stage, String statusInformation, UpdateProjectStageStatusFieldValue stageStatusValue, Boolean append)
Parameters
NameTypeDescription
stageStageThe workflow stage to be updated.
statusInformationStringThe status message.
stageStatusValueUpdateProjectStageStatusFieldValueAn enumeration constant that indicates the stage status.
appendBooleanTrue if the status message is appended to the current stage status;False if the status message overwrites the current status.
Return Value

void

Remarks

The DraftProject class class and the PublishedProject class class derive from the Project class.

To set the value of properties in an existing project:

  1. Use the PublishedProject CheckOut method.
  2. Edit the DraftProject object.
  3. Check in the edited project using the DraftProject CheckIn method.

See Also

DraftProject
Engagement
ProjectEngagement
PublishedProject
QueueJob
SPUser

© 2018 Microsoft