UserWorkschedule

A work schedule [UserWorkschedule] is the weekly or multiweekly pattern of work followed by the company or by an employee. It determines the employees' normal working days and working hours of users.

Review the Usage Guidelines for the UserWorkschedule object.

XML

SOAP

REST

Database table

Object

UserWorkschedule

oaUserWorkschedule

workschedule

Supported Commands

Add, Read, Modify, Delete

add(), read(), modify(), upsert(), delete()

The UserWorkschedule object has the following properties:

XML / SOAP

Database

Description

account_workscheduleid

account_workschedule_id

The ID of the company workschedule to use when userid is not 0.

acct_code

acct_code

Optional accounting system code for integration with external accounting systems.

created

created

[Read-only] Time the record was created. See Date Fields.

externalid

external_id

If the record was imported from an external system you store the unique external record id here.

id

id

[Read-only] Unique ID. Automatically assigned by OpenAir.

master_workscheduleid

master_workschedule_id

ID of master workschedule. This workschedule is part of sequence in a recurring multi-week schedule.

name

name

[Required] The company-wide schedule name for company schedules or user's first and last name for user schedules."

sample_date

sample_date

See Date Fields.

updated

updated

[Read-only] Time the record was last updated or modified. See Date Fields.

use_this_schedule

use_this_schedule

Can be 0 or 1.

  • If "1" and userid has a value, then this is a user schedule (with userid above) which overrides the company schedule.

  • If "1" and userid is 0, then this is a company schedule.

  • If "0" then the user (with userid above) is using the company schedule indicated by account_workscheduleid.

userid

user_id

ID of the user if this is a users work schedule. 0 - if there is a company work schedule.

Required if use_this_schedule is set to 1.

week_num

week_num

Sequence/week number of recurring schedule. Master records will always be week 1. Child workschedules will be begin at week 2.

workdays

workdays

A seven-letter string indicating which days of the week are available for project work. (Monday is 0, Sunday is 6; 01234 = Mon. - Fri.; 0123456 = every day). Always begins with the letter “x” (So “Monday only” would be “x0”).

Required if use_this_schedule is set to 1.

workhourid

workhour_id

ID of the workhour if this is a users work schedule.

workhours

workhours

[Required] The number of hours worked per day. Must be a numerical value between 0 (not included) and 24 (included).

Usage Guidelines

Review the following guidelines:

  • For exceptions to the normal work pattern, see Scheduleexception.

  • When you add or modify a User, you can modify the UserWorkschedule associated with that User. See Setting User Work Schedule.

  • A user can have only one work schedule. There cannot be more than one UserWorkschedule object with the same userid.