DraftTask class
inherits members from Task
Represents a task in a checked-out project.
Syntax
CSOM
class DraftTask
JSOM
PS.DraftTask
REST Interface
This resource supports GET, POST, PUT, PATCH, MERGE, and DELETE HTTP commands.
PS.DraftTask
http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/Projects('{projectid}')/Draft/Tasks('{taskid}')
Members
✓ - Read Support ✓ʷ - Write Support
Properties
Name | .NET | JSOM | REST | Type | Description |
---|---|---|---|---|---|
[] | ✓ʷ | Dictionary<string, Object> | Gets or sets an item in the draft task. | ||
ActualCost | ✓ʷ | ✓ʷ | ✓ʷ | Double | Gets or set costs incurred for work already performed on a task, together with any other recorded costs that are associated with a task. |
ActualFinish | ✓ʷ | ✓ʷ | ✓ʷ | DateTime | Gets or sets a date and time when a task is complete. |
ActualStart | ✓ʷ | ✓ʷ | ✓ʷ | DateTime | Gets or sets a date and time that a task actually began, based on progress information that has been entered. |
ActualWork | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the amount of work that has already been performed on a task. |
ActualWorkMilliseconds | ✓ʷ | ✓ʷ | Integer | Gets or sets the time interval, expressed in milliseconds, for the amount of work that has already been performed on a task. | |
ActualWorkTimeSpan | ✓ʷ | ✓ʷ | TimeSpan | Gets or sets the time interval for the amount of work that has already been performed on a task. | |
AddAfterId | ✓ | Guid | Id of the task that immediately precedes the current task. | ||
Assignments | ✓ | ✓ | ✓ | DraftAssignmentCollection | Gets the assignments for a task. |
BudgetWork | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the amount of work that is estimated to be performed on a task. |
BudgetWorkMilliseconds | ✓ʷ | ✓ʷ | Integer | Gets or sets the time interval, expressed in milliseconds, for the amount of work that is estimated to be performed on a task. | |
BudgetWorkTimeSpan | ✓ʷ | ✓ʷ | TimeSpan | Gets or sets the time interval for the amount of work that is estimated to be performed on a task. | |
Calendar | ✓ʷ | ✓ʷ | ✓ʷ | Calendar | Gets or sets the task calendar. |
Completion | ✓ʷ | ✓ʷ | ✓ʷ | DateTime | Gets or sets a completion date for a task. |
ConstraintStartEnd | ✓ʷ | ✓ʷ | ✓ʷ | DateTime | Gets or sets a constraint start date or end date for a task. |
ConstraintType | ✓ʷ | ✓ʷ | ✓ʷ | ConstraintType | Gets or sets the time constraint type for a task. |
Cost | ✓ʷ | ✓ʷ | ✓ʷ | Double | Gets or sets the total scheduled or projected cost based on costs already incurred for work performed on a task, in addition to the costs planned for the remaining work. |
Deadline | ✓ʷ | ✓ʷ | ✓ʷ | DateTime | Gets or sets the date that was entered as a deadline for a task. |
Duration | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the amount of time that it takes to complete a task. |
DurationMilliseconds | ✓ʷ | ✓ʷ | Integer | Gets or sets the time interval, expressed in milliseconds, for the amount of time that it takes to complete a task. | |
DurationTimeSpan | ✓ʷ | ✓ʷ | TimeSpan | Gets or sets the time interval for the amount of time that it takes to complete a task. | |
FieldValues | ✓ | ✓ | Dictionary<string, Object> | Gets the collection of custom fields that have values set for the draft task. | |
Finish | ✓ʷ | ✓ʷ | ✓ʷ | DateTime | Gets or sets a task finish date. |
FinishText | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets a string representation of the task finish date. |
FixedCost | ✓ʷ | ✓ʷ | ✓ʷ | Double | Gets or sets any non-resource task expense. |
IsActive | ✓ʷ | ✓ʷ | ✓ʷ | Boolean | Gets or sets a value that indicates whether a task is active. |
IsLockedByManager | ✓ʷ | ✓ʷ | ✓ʷ | Boolean | Gets or sets a value that indicates whether a task has been locked for changes by a manager. |
IsManual | ✓ʷ | ✓ʷ | ✓ʷ | Boolean | Gets or sets a value that indicates whether a task is manually scheduled. |
IsMarked | ✓ʷ | ✓ʷ | ✓ʷ | Boolean | Gets or sets a value that indicates whether a task has been marked as having special meaning. |
IsMilestone | ✓ʷ | ✓ʷ | ✓ʷ | Boolean | Gets or sets a value that indicates whether a task is a milestone. |
Item | ✓ʷ | Dictionary<string, Object> | Gets or sets an item in the draft task. | ||
LevelingAdjustsAssignments | ✓ʷ | ✓ʷ | ✓ʷ | Boolean | Gets or sets a value that indicates whether leveling can delay or split assignments (rather than the task itself) to resolve overallocations. |
LevelingCanSplit | ✓ʷ | ✓ʷ | ✓ʷ | Boolean | Gets or sets a value that indicates whether leveling can interrupt and split a task. |
Name | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the name of a task. |
OutlineLevel | ✓ʷ | ✓ʷ | ✓ʷ | Integer | Gets or sets the task outline level in a hierarchical task list. |
Parent | ✓ | ✓ | ✓ | DraftTask | Gets the parent task. |
ParentId | ✓ | Guid | Gets the Guid of the parent task in a hierarchical task list. | ||
PercentComplete | ✓ʷ | ✓ʷ | ✓ʷ | Integer | Gets or sets the percent of duration completed on a task. |
PercentPhysicalWorkComplete | ✓ʷ | ✓ʷ | ✓ʷ | Integer | Gets or sets the percentage of physical work completed on a task. |
Predecessors | ✓ | ✓ | ✓ | DraftTaskLinkCollection | Gets the links to the predecessor tasks that the current task depends on. |
Priority | ✓ʷ | ✓ʷ | ✓ʷ | Integer | Gets or sets the task priority. |
RemainingDuration | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the remaining task duration. |
RemainingDurationMilliseconds | ✓ʷ | ✓ʷ | Integer | Gets or sets the time interval, expressed in milliseconds, for the remaining task duration. | |
RemainingDurationTimeSpan | ✓ʷ | ✓ʷ | TimeSpan | Gets or sets the time interval for the remaining task duration. | |
Start | ✓ʷ | ✓ʷ | ✓ʷ | DateTime | Gets or sets the task start date. |
StartText | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets a string representation of the task start date. |
StatusManager | ✓ʷ | ✓ʷ | ✓ʷ | SPUser | Gets or sets the task status manager. |
Successors | ✓ | ✓ | ✓ | DraftTaskLinkCollection | Gets links to tasks that depend on the current task. |
TaskType | ✓ʷ | ✓ʷ | ✓ʷ | TaskType | Gets or sets the task type. |
UsePercentPhysicalWorkComplete | ✓ʷ | ✓ʷ | ✓ʷ | Boolean | Gets or sets a value that indicates whether to use PercentPhysicalWorkComplete orPercentComplete to compute earned value. |
Work | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the total time scheduled for a task. |
WorkMilliseconds | ✓ʷ | ✓ʷ | Integer | Gets or sets the time interval, expressed in milliseconds, for the total time scheduled for a task. | |
WorkTimeSpan | ✓ʷ | ✓ʷ | TimeSpan | Gets or sets the time interval for the total time scheduled for a task. |
Methods
Name | .NET | JSOM | REST | Return Type | Description |
---|---|---|---|---|---|
DeleteObject() | ✓ | ✓ | ✓ | void | Deletes the draft task object. |
SetCustomFieldValue(String fieldName, Object value) | ✓ | ✓ | void | Sets a custom field on the draft task. |
#### Method Details
DeleteObject()
Deletes the draft task object.
Syntax
void DeleteObject()
Parameters
None
Return Value
void
SetCustomFieldValue(String fieldName, Object value)
Sets a custom field on the draft task.
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
DraftTaskCollection
DraftTaskLink
SPUser
TaskCreationInformation