TimeSheetWorkCollection class

inherits members from ClientObjectCollection

Provides a collection of actual work entries for a timesheet.

Syntax

CSOM

class TimeSheetWorkCollection 

JSOM

PS.TimeSheetWorkCollection

REST Interface

Supported.

PS.TimeSheetWorkCollection

http://contoso.sharepoint.com/sites/pwa/_api/ProjectServer/TimeSheetPeriods('{periodid}')/TimeSheet/Lines('{lineid}')/Work

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

Name .NET JSOM REST Type Description
[Integer] TimeSheetWork Gets a TimeSheetWork from the collection at the specified index.
Item TimeSheetWork Gets a TimeSheetWork from the collection at the specified index.

Methods

Name .NET JSOM REST Return Type Description
Add(TimeSheetWorkCreationInformation parameters) TimeSheetWork Adds the TimeSheetWork that is specified by the TimeSheetWorkCreationInformation object to the collection.
GetById(String objectId) TimeSheetWork Gets a TimeSheetWork from the collection with the Id value.
GetByStartDate(DateTime start) TimeSheetWork Gets a timesheet actual work object from the collection with a specified start date.
Remove(TimeSheetWork work) Boolean Removes the specified TimeSheetWork from the collection.


Method Details

Add(TimeSheetWorkCreationInformation parameters)

Adds the TimeSheetWork that is specified by the TimeSheetWorkCreationInformation object to the collection.

Syntax
TimeSheetWork Add(TimeSheetWorkCreationInformation parameters)
Parameters
Name Type Description
parameters TimeSheetWorkCreationInformation The properties that can be set when creating a time sheet work.
Return Value

TimeSheetWork

GetById(String objectId)

Gets a TimeSheetWork from the collection with the Id value.

Syntax
TimeSheetWork GetById(String objectId)
Parameters
Name Type Description
objectId String The id of the TimeSheetWork.
Return Value

TimeSheetWork

GetByStartDate(DateTime start)

Gets a timesheet actual work object from the collection with a specified start date.

Syntax
TimeSheetWork GetByStartDate(DateTime start)
Parameters
Name Type Description
start DateTime The start date and time.
Return Value

TimeSheetWork

Remove(TimeSheetWork work)

Removes the specified TimeSheetWork from the collection.

Syntax
Boolean Remove(TimeSheetWork work)
Parameters
Name Type Description
work TimeSheetWork The TimeSheetWork to remove.
Return Value

Boolean

See Also

TimeSheetLine
TimeSheetWork
TimeSheetWorkCreationInformation