TimeSheetLineCollection class
inherits members from ClientObjectCollection
Represents a collection of timesheet lines.
Syntax
CSOM
class TimeSheetLineCollection
JSOM
PS.TimeSheetLineCollection
REST Interface
Supported.
PS.TimeSheetLineCollection
http://contoso.sharepoint.com/sites/pwa/_api/ProjectServer/TimeSheetPeriods('{periodid}')/TimeSheet/Lines
Members
✓ - Read Support ✓ʷ - Write Support
Properties
Name | .NET | JSOM | REST | Type | Description |
---|---|---|---|---|---|
[Integer] | ✓ | TimeSheetLine | Gets a TimeSheetLine from the collection at the specified index. | ||
Item | ✓ | TimeSheetLine | Gets a TimeSheetLine from the collection at the specified index. |
Methods
Name | .NET | JSOM | REST | Return Type | Description |
---|---|---|---|---|---|
'{TimeSheetLineId}' | ✓ | TimeSheetLine | Gets a TimeSheetLine from the collection with the specified TimeSheetLineId. | ||
Add(TimeSheetLineCreationInformation parameters) | ✓ | ✓ | ✓ | TimeSheetLine | Adds the TimeSheetLine that is specified by the TimeSheetLineCreationInformation object to the collection. |
GetByGuid(Guid uid) | ✓ | ✓ | ✓ | TimeSheetLine | Gets a TimeSheetLine from the collection with the Guid value. |
GetById(String objectId) | ✓ | ✓ | ✓ | TimeSheetLine | Gets a TimeSheetLine from the collection with the Id value. |
Remove(TimeSheetLine line) | ✓ | ✓ | Boolean | Removes the specified TimeSheetLine from the collection. |
#### Method Details
'{TimeSheetLineId}'
Gets a TimeSheetLine from the collection with the specified TimeSheetLineId.
Syntax
TimeSheetLine http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/TimeSheetPeriods('{periodid}')/TimeSheet/Lines('{TimeSheetLineId}')
Parameters
Name | Type | Description |
---|---|---|
TimeSheetLineId | String | the id of the TimeSheetLine |
Return Value
Add(TimeSheetLineCreationInformation parameters)
Adds the TimeSheetLine that is specified by the TimeSheetLineCreationInformation object to the collection.
Syntax
TimeSheetLine Add(TimeSheetLineCreationInformation parameters)
Parameters
Name | Type | Description |
---|---|---|
parameters | TimeSheetLineCreationInformation | The properties that can be set when creating a time sheet line. |
Return Value
GetByGuid(Guid uid)
Gets a TimeSheetLine from the collection with the Guid value.
Syntax
TimeSheetLine GetByGuid(Guid uid)
Parameters
Name | Type | Description |
---|---|---|
uid | Guid | The Guid of the TimeSheetLine |
Return Value
GetById(String objectId)
Gets a TimeSheetLine from the collection with the Id value.
Syntax
TimeSheetLine GetById(String objectId)
Parameters
Name | Type | Description |
---|---|---|
objectId | String | The id of the TimeSheetLine. |
Return Value
Remove(TimeSheetLine line)
Removes the specified TimeSheetLine from the collection.
Syntax
Boolean Remove(TimeSheetLine line)
Parameters
Name | Type | Description |
---|---|---|
line | TimeSheetLine | The TimeSheetLine to remove. |
Return Value
Boolean