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

TimeSheetWorkCollection class

Nadin Merali|Last Updated: 5/6/2017

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.NETJSOMRESTTypeDescription
[Integer]TimeSheetWorkGets a TimeSheetWork from the collection at the specified index.
ItemTimeSheetWorkGets a TimeSheetWork from the collection at the specified index.

Methods

Name.NETJSOMRESTReturn TypeDescription
Add(TimeSheetWorkCreationInformation parameters)TimeSheetWorkAdds the TimeSheetWork that is specified by the TimeSheetWorkCreationInformation object to the collection.
GetById(String objectId)TimeSheetWorkGets a TimeSheetWork from the collection with the Guid value.
GetByStartDate(DateTime start)TimeSheetWorkGets a timesheet actual work object from the collection with a specified start date.
Remove(TimeSheetWork work)BooleanRemoves 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
NameTypeDescription
parametersTimeSheetWorkCreationInformationThe 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 Guid value.

Syntax
TimeSheetWork GetById(String objectId)
Parameters
NameTypeDescription
objectIdStringThe 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
NameTypeDescription
startDateTimeThe start date and time.
Return Value

TimeSheetWork

Remove(TimeSheetWork work)

Removes the specified TimeSheetWork from the collection.

Syntax
Boolean Remove(TimeSheetWork work)
Parameters
NameTypeDescription
workTimeSheetWorkThe TimeSheetWork to remove.
Return Value

Boolean

See Also

TimeSheetLine
TimeSheetWork
TimeSheetWorkCreationInformation

© 2018 Microsoft