TimeSheet class
inherits members from ClientObject
Contains the methods and properties for managing a timesheet.
Syntax
CSOM
class TimeSheet
JSOM
PS.TimeSheet
REST Interface
Supported.
PS.TimeSheet
http://contoso.sharepoint.com/sites/pwa/_api/ProjectServer/TimeSheetPeriods('{periodid}')/TimeSheet
Members
✓ - Read Support ✓ʷ - Write Support
Properties
Name | .NET | JSOM | REST | Type | Description |
---|---|---|---|---|---|
Comments | ✓ | ✓ | ✓ | String | Gets the timesheet comments. |
Creator | ✓ | ✓ | ✓ | SPUser | Gets the timesheet creator. |
EntryMode | ✓ʷ | ✓ʷ | ✓ʷ | TimeSheetEntryMode | Gets or sets the timesheet entry mode. |
Id | ✓ | ✓ | ✓ | Guid | Gets the GUID of the time sheet. |
IsControlledByOwner | ✓ʷ | ✓ʷ | ✓ʷ | Boolean | Gets or sets a value that indicates whether the timesheet is controlled by the owner. |
IsProcessed | ✓ʷ | ✓ʷ | ✓ʷ | Boolean | Gets or sets a value that indicates whether the timesheet is finalized and should not be changed. |
Lines | ✓ | ✓ | ✓ | TimeSheetLineCollection | Gets the collection of lines in the timesheet. |
Manager | ✓ | ✓ | ✓ | SPUser | Gets the timesheet manager. |
Name | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the timesheet name. |
Period | ✓ | ✓ | ✓ | TimeSheetPeriod | Gets the timesheet period. |
Status | ✓ʷ | ✓ʷ | ✓ʷ | TimeSheetStatus | Gets or sets the timesheet line status. |
TotalActualWork | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the timesheet total actual work. |
TotalActualWorkMilliseconds | ✓ʷ | ✓ʷ | Integer | Gets or sets the time interval, expressed in milliseconds, for the timesheet total actual work. | |
TotalActualWorkTimeSpan | ✓ʷ | ✓ʷ | TimeSpan | Gets or sets the time interval for the timesheet total actual work. | |
TotalNonBillableOvertimeWork | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the timesheet total non-billable overtime work. |
TotalNonBillableOvertimeWorkMilliseconds | ✓ʷ | ✓ʷ | Integer | Gets or sets the time interval, expressed in milliseconds, for the timesheet total non-billable overtime work. | |
TotalNonBillableOvertimeWorkTimeSpan | ✓ʷ | ✓ʷ | TimeSpan | Gets or sets the time interval for the timesheet total non-billable overtime work. | |
TotalNonBillableWork | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the timesheet total non-billable work. |
TotalNonBillableWorkMilliseconds | ✓ʷ | ✓ʷ | Integer | Gets or sets the time interval, expressed in milliseconds, for the timesheet total non-billable work. | |
TotalNonBillableWorkTimeSpan | ✓ʷ | ✓ʷ | TimeSpan | Gets or sets the time interval for the timesheet total non-billable work. | |
TotalOvertimeWork | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the timesheet total overtime work. |
TotalOvertimeWorkMilliseconds | ✓ʷ | ✓ʷ | Integer | Gets or sets the time interval, expressed in milliseconds, for the timesheet total overtime work. | |
TotalOvertimeWorkTimeSpan | ✓ʷ | ✓ʷ | TimeSpan | Gets or sets the time interval for the timesheet total overtime work. | |
TotalWork | ✓ʷ | ✓ʷ | ✓ʷ | String | Gets or sets the timesheet grand total of all work. |
TotalWorkMilliseconds | ✓ʷ | ✓ʷ | Integer | Gets or sets the time interval, expressed in milliseconds, for the timesheet grand total of all work. | |
TotalWorkTimeSpan | ✓ʷ | ✓ʷ | TimeSpan | Gets or sets the time interval for the timesheet grand total of all work. | |
WeekStartsOn | ✓ʷ | ✓ʷ | ✓ʷ | Byte | Gets or sets the day of the week on which the timesheet starts. |
Methods
Name | .NET | JSOM | REST | Return Type | Description |
---|---|---|---|---|---|
DeleteObject() | ✓ | ✓ | ✓ | void | Deletes the time sheet object. |
Recall() | ✓ | ✓ | ✓ | void | Recalls the timesheet. |
Submit(String comment) | ✓ | ✓ | ✓ | void | Submits the timesheet. |
Update() | ✓ | ✓ | ✓ | void | Saves changes in a new timesheet. |
#### Method Details
DeleteObject()
Deletes the time sheet object.
Syntax
void DeleteObject()
Parameters
None
Return Value
void
Recall()
Recalls the timesheet.
Syntax
void Recall()
Parameters
None
Return Value
void
Submit(String comment)
Submits the timesheet.
Syntax
void Submit(String comment)
Parameters
Name | Type | Description |
---|---|---|
comment | String | A comment on the timesheet. |
Return Value
void
Update()
Saves changes in a new timesheet.
Syntax
void Update()
Parameters
None
Return Value
void