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

DraftProject class

Nadin Merali|Last Updated: 5/6/2017

inherits members from Project

Represents the draft version of a project that is either new, or a PublishedProject that is checked out for editing.

Syntax

CSOM

class DraftProject 

JSOM

PS.DraftProject

REST Interface

Supported.

PS.DraftProject

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

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

Name.NETJSOMRESTTypeDescription
[]✓ʷDictionary<string, Object>Gets or sets an item in the draft project.
AssignmentsDraftAssignmentCollectionGets the collection of assignments for a project.
Calendar✓ʷ✓ʷ✓ʷCalendarGets or sets a Project Server calendar.
CurrencyCode✓ʷ✓ʷ✓ʷStringGets or sets the currency code of the project, as defined in ISO 4217.
CurrencyDigits✓ʷ✓ʷ✓ʷIntegerGets or sets the number of decimal digits in currency values.
CurrencyPosition✓ʷ✓ʷ✓ʷCurrencySymbolPositionGets or sets the placement of the currency symbol in relation to the currency value.
CurrencySymbol✓ʷ✓ʷ✓ʷStringGets or sets the currency symbol that represents the type of currency that is used in the project.
CurrentDate✓ʷ✓ʷ✓ʷDateTimeGets or sets the current date for the project.
DaysPerMonth✓ʷ✓ʷ✓ʷIntegerGets or sets the default number of working days per month.
DefaultEffortDriven✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether the scheduling of new tasks is effort-driven.
DefaultEstimatedDuration✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether new tasks have estimated durations.
DefaultFixedCostAccrual✓ʷ✓ʷ✓ʷFixedCostAccrualGets or sets a value that indicates which default fixed cost accrual method to use on new tasks.
DefaultOvertimeRate✓ʷ✓ʷ✓ʷDoubleGets or sets the default overtime rate for local resources.
DefaultStandardRate✓ʷ✓ʷ✓ʷDoubleGets or sets the default standard rate for local resources.
DefaultTaskType✓ʷ✓ʷ✓ʷTaskTypeGets or sets the default type for tasks in the project.
DefaultWorkFormat✓ʷ✓ʷ✓ʷWorkFormatGets or sets the default format for work duration.
Description✓ʷ✓ʷ✓ʷStringGets or sets a project description.
FieldValuesDictionary<string, Object>Gets the collection of custom fields that have values set for the draft project.
FinishDate✓ʷ✓ʷ✓ʷDateTimeGets or sets the project finish date.
FiscalYearStartMonth✓ʷ✓ʷ✓ʷIntegerGets or sets the number of the first month in the fiscal year.
IncludeCustomFieldsDraftProjectGets a DraftProject object that includes custom fields.
Item✓ʷDictionary<string, Object>Gets or sets an item in the draft project.
MinutesPerDay✓ʷ✓ʷ✓ʷIntegerGets or sets the default number of minutes per day.
MinutesPerWeek✓ʷ✓ʷ✓ʷIntegerGets or sets the default number of minutes per week.
Name✓ʷ✓ʷ✓ʷStringGets or sets a project name.
NewTasksAreManual✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether new tasks are manually scheduled.
NumberFiscalYearFromStart✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether to use the project start year for fiscal year numbering.
Owner✓ʷ✓ʷ✓ʷSPUserGets or sets the project owner.
ProjectIdentifier✓ʷ✓ʷ✓ʷStringGets or sets the Project Identifer (secondary identifer)
ProjectResourcesDraftProjectResourceCollectionGets the collection of resources for a project.
ProtectedActualsSynch✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether the project actuals are synchronized with the protected actuals.
ShowEstimatedDurations✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether a question mark is displayed after an estimated duration for a task.
StartDate✓ʷ✓ʷ✓ʷDateTimeGets or sets the project start date.
StatusDate✓ʷ✓ʷ✓ʷDateTimeGets or sets the current status date for the project.
TaskLinksDraftTaskLinkCollectionGets the collection of draft task link objects for the project.
TasksDraftTaskCollectionGets the collection of task objects for the project.
TrackingMode✓ʷ✓ʷ✓ʷTrackingModeGets or sets the default tracking method for all assignments in the project.
UtilizationDate✓ʷ✓ʷ✓ʷDateTimeThe start date and time for use of the resource plan.
UtilizationType✓ʷ✓ʷ✓ʷUtilizationTypeAn enumerated value that represents the utilization type of a resource plan.
WeekStartDay✓ʷ✓ʷ✓ʷIntegerGets or sets the day of the week on which a work week starts.
WinprojVersion✓ʷ✓ʷ✓ʷDecimalGets or sets the version of Project Professional that created the draft project.

Methods

Name.NETJSOMRESTReturn TypeDescription
ChangeEnterpriseProjectType(Guid enterpriseProjectTypeUid)voidChanges or sets an EnterpriseProjectType associated with a project.
CheckIn(Boolean force)QueueJobQueues a check-in job for a draft project if it is still checked out.
Publish(Boolean checkIn)QueueJobQueues a publish job to get the changes from the draft project back to the published version.
Update()QueueJobSaves changes in a new project or checked-out draft project back to Project Server.
UpdateCustomFields(Collection(SP.KeyValue) customFieldDictionary)QueueJobUpdates the custom fields for a project in bulk.
Validate()voidValidates pending changes from all added or removed projects.


Method Details

ChangeEnterpriseProjectType(Guid enterpriseProjectTypeUid)

Changes or sets an EnterpriseProjectType associated with a project.

Syntax
void ChangeEnterpriseProjectType(Guid enterpriseProjectTypeUid)
Parameters
NameTypeDescription
enterpriseProjectTypeUidGuidId of the new EnterpriseProjectType.
Return Value

void

CheckIn(Boolean force)

Queues a check-in job for a draft project if it is still checked out.

Syntax
QueueJob CheckIn(Boolean force)
Parameters
NameTypeDescription
forceBooleanTrue if the administrator or project owner forces check in of a project; otherwise, False.
Return Value

QueueJob
A queued job that will check in the draft version of the project.

Publish(Boolean checkIn)

Queues a publish job to get the changes from the draft project back to the published version.

Syntax
QueueJob Publish(Boolean checkIn)
Parameters
NameTypeDescription
checkInBooleanBoolean that indicates whether the project should be checked in after it is published.
Return Value

QueueJob
A QueueJob object that contains information about the queued job. If the queue job is successful, the Project Server Queuing Service publishes the draft version of the project.

Update()

Saves changes in a new project or checked-out draft project back to Project Server.

Syntax
QueueJob Update()
Parameters

None

Return Value

QueueJob
A QueueJob object that contains information about the queued job. If the queue job is successful, the Project Server Queuing Service saves the new or draft version of the project.

UpdateCustomFields(Collection(SP.KeyValue) customFieldDictionary)

Syntax
QueueJob UpdateCustomFields(Collection(SP.KeyValue) customFieldDictionary)
Parameters
NameTypeDescription
customFieldDictionaryCollection(SP.KeyValue)Collection of project custom fields to set for the project
Return Value

QueueJob
A QueueJob object that contains information about the queued job. If the queue job is successful, the Project Server Queuing Service saves the new or draft version of the project.

Validate()

Validates pending changes from all added or removed projects.

Syntax
void Validate()
Parameters

None

Return Value

void

Remarks

The DraftProject class and the PublishedProject 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

Collection(SP.KeyValue)
PublishedProject
SPUser

© 2018 Microsoft