EntryTimesheet Examples

Query all

Query all the entry timesheets.

[
  {
    "Action": "Query",
    "QueryType": "EntryTimesheetAll",
    "DomainType": "Replicon.Suite.Domain.EntryTimesheet",
    "Args": [],
    "Load": [
      {
        "Relationship": "TimeEntries"
      },
      {
        "Relationship": "TimeOffEntries"
      }
    ]
  }
]

Query By Id

Query an entry timesheet by Id.

[
  {
    "Action": "Query",
    "QueryType": "EntryTimesheetById",
    "DomainType": "Replicon.Suite.Domain.EntryTimesheet",
    "Args": [
      [
        74
      ]
    ],
    "Load": [
      {
        "Relationship": "TimeEntries"
      },
      {
        "Relationship": "TimeOffEntries"
      }
    ]
  }
]

Query By User

Query entry timesheets by User.

[
  {
    "Action": "Query",
    "QueryType": "EntryTimesheetByUser",
    "DomainType": "Replicon.Suite.Domain.EntryTimesheet",
    "Args": [
      {
        "__type": "Replicon.Domain.User",
        "Identity": "2"
      }
    ],
    "Load": [
      {
        "Relationship": "TimeEntries"
      },
      {
        "Relationship": "TimeOffEntries"
      }
    ]
  }
]

Create / Query By User and Date

Retrieves the timesheet for a user that includes the specified date. If necessary, the timesheet period will be automatically created for that date. Occasionally errors may prevent the creation of a timesheet period (for example, if it is too far in the future); in those cases, the error will be returned from this API call.

[
  {
    "Action": "Query",
    "QueryType": "EntryTimesheetByUserDate",
    "DomainType": "Replicon.Suite.Domain.EntryTimesheet",
    "Args": [
      {
        "__type": "Replicon.Domain.User",
        "Identity": "2"
      },
      {
        "__type": "Date",
        "Year": 2011,
        "Month": 5,
        "Day": 9
      }
    ],
    "Load": [
      {
        "Relationship": "TimeEntries"
      },
      {
        "Relationship": "TimeOffEntries"
      }
    ]
  }
]

Approve

Approve an entry based timesheet.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Suite.Domain.EntryTimesheet",
    "Identity": "1",
    "Operations": [
      {
        "__operation": "Approve",
        "Comment": "I approve of this timesheet."
      }
    ]
  }
]

Reject

Reject an entry based timesheet.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Suite.Domain.EntryTimesheet",
    "Identity": "1",
    "Operations": [
      {
        "__operation": "Reject",
        "Comment": "I don't like this timesheet."
      }
    ]
  }
]

Reopen

Reopen an entry based timesheet.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Suite.Domain.EntryTimesheet",
    "Identity": "1",
    "Operations": [
      {
        "__operation": "Reopen",
        "Comment": "Gotta make a fix."
      }
    ]
  }
]

SetUdfValues

Set UDFs on an entry based timesheet.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Suite.Domain.EntryTimesheet",
    "Identity": "1",
    "Operations": [
      {
        "__operation": "SetUdfValues",
        "TimesheetUDF1": "10"
      }
    ]
  }
]

Submit

Submit an entry based timesheet.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Suite.Domain.EntryTimesheet",
    "Identity": "1",
    "Operations": [
      {
        "__operation": "Submit",
        "Comment": "My submit comment"
      }
    ]
  }
]

Unsubmit

Unsubmit an entry based timesheet.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Suite.Domain.EntryTimesheet",
    "Identity": "1",
    "Operations": [
      {
        "__operation": "Unsubmit"
      }
    ]
  }
]

FilteredHistory relationship in EntryTimesheet

Filtered Timesheet approval history is a subset of Timesheet approval history that does not contain the modifications performed by the timesheet owner or the substitute of timesheet owner at any time.

[
  {
    "Action": "Query",
    "QueryType": "TimesheetByDateRange",
    "DomainType": "Replicon.Suite.Domain.EntryTimesheet",
    "Args": [
      {
        "__type": "Date",
        "Year": 2010,
        "Month": 8,
        "Day": 1
      },
      {
        "__type": "Date",
        "Year": 2010,
        "Month": 8,
        "Day": 30
      }
    ],
    "Load": [
      {
        "Relationship": "FilteredHistory"
      }
    ]
  }
]

Query timesheets by modified since (UTC)

Query timesheets modified since a specific date/time (UTC timezone).

[
  {
    "Action": "Query",
    "QueryType": "EntryTimesheetModifiedSince",
    "DomainType": "Replicon.Suite.Domain.EntryTimesheet",
    "Args": [
      {
        "Type": "DateTime",
        "Year": 2011,
        "Month": 7,
        "Day": 19,
        "Hour": 10,
        "Minute": 12,
        "Second": 49
      }
    ]
  }
]

Query timesheets by user and modified since (UTC)

Query for timesheets owned by a specific user, and modified since a specific date & time (UTC timezone).

[
  {
    "Action": "Query",
    "QueryType": "EntryTimesheetByUserModifiedSince",
    "DomainType": "Replicon.Suite.Domain.EntryTimesheet",
    "Args": [
      {
        "Type": "Replicon.Domain.User",
        "Identity": "2"
      },
      {
        "Type": "DateTime",
        "Year": 2011,
        "Month": 7,
        "Day": 19,
        "Hour": 10,
        "Minute": 12,
        "Second": 49
      }
    ]
  }
]

Query timesheets by approver

Query for timesheets waiting for approval by a specific approver.

[
  {
    "Action": "Query",
    "QueryType": "EntryTimesheetWaitingApprovalByApprover",
    "DomainType": "Replicon.Suite.Domain.EntryTimesheet",
    "Args": [
      {
        "Type": "Replicon.Domain.User",
        "Identity": "2"
      }
    ]
  }
]

Query timesheets by approver and modified since (UTC)

Query for timesheets waiting for approval by a specific approver, and modified since a specific date & time (UTC timezone).

[
  {
    "Action": "Query",
    "QueryType": "EntryTimesheetWaitingByApproverModifiedSince",
    "DomainType": "Replicon.Suite.Domain.EntryTimesheet",
    "Args": [
      {
        "Type": "Replicon.Domain.User",
        "Identity": "2"
      },
      {
        "Type": "DateTime",
        "Year": 2012,
        "Month": 3,
        "Day": 2,
        "Hour": 17,
        "Minute": 40,
        "Second": 22
      }
    ]
  }
]