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

TimeSheetLineCollection class

Nadin Merali|Last Updated: 5/6/2017

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.NETJSOMRESTTypeDescription
[Integer]TimeSheetLineGets a TimeSheetLine from the collection at the specified index.
ItemTimeSheetLineGets a TimeSheetLine from the collection at the specified index.

Methods

Name.NETJSOMRESTReturn TypeDescription
'{TimeSheetLineId}'TimeSheetLineGets a TimeSheetLine from the collection with the specified TimeSheetLineId.
Add(TimeSheetLineCreationInformation parameters)TimeSheetLineAdds the TimeSheetLine that is specified by the TimeSheetLineCreationInformation object to the collection.
GetByGuid(Guid uid)TimeSheetLineGets a TimeSheetLine from the collection with the Id value.
GetById(String objectId)TimeSheetLineGets a TimeSheetLine from the collection with the Guid value.
Remove(TimeSheetLine line)BooleanRemoves 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
NameTypeDescription
TimeSheetLineIdStringthe id of the TimeSheetLine
Return Value

TimeSheetLine

Add(TimeSheetLineCreationInformation parameters)

Adds the TimeSheetLine that is specified by the TimeSheetLineCreationInformation object to the collection.

Syntax
TimeSheetLine Add(TimeSheetLineCreationInformation parameters)
Parameters
NameTypeDescription
parametersTimeSheetLineCreationInformationThe properties that can be set when creating a time sheet line.
Return Value

TimeSheetLine

GetByGuid(Guid uid)

Gets a TimeSheetLine from the collection with the Id value.

Syntax
TimeSheetLine GetByGuid(Guid uid)
Parameters
NameTypeDescription
uidGuidThe Guid of the TimeSheetLine
Return Value

TimeSheetLine

GetById(String objectId)

Gets a TimeSheetLine from the collection with the Guid value.

Syntax
TimeSheetLine GetById(String objectId)
Parameters
NameTypeDescription
objectIdStringThe id of the TimeSheetLine.
Return Value

TimeSheetLine

Remove(TimeSheetLine line)

Removes the specified TimeSheetLine from the collection.

Syntax
Boolean Remove(TimeSheetLine line)
Parameters
NameTypeDescription
lineTimeSheetLineThe TimeSheetLine to remove.
Return Value

Boolean

See Also

TimeSheet
TimeSheetLine
TimeSheetLineCreationInformation

© 2018 Microsoft