Skip to main content

system.mes.shift.getAllShifts

Description

Retrieves a list of all Shifts records in the system.

Syntax

system.mes.shift.getAllShifts()
system.mes.shift.getAllShifts(includeDisabled)

Parameters

Method 1: No Parameters

ParameterTypeNullableDescription
None--This method does not take any parameters.

Method 2: Include Disabled Flag

ParameterTypeNullableDescription
includeDisabledBooleanTrueWhether to include disabled records. If null/omitted, defaults to false.

Returns

Returns a list of JSON objects representing all shifts.

Code Examples

# Retrieve all shifts (enabled only)
shifts = system.mes.shift.getAllShifts()
print(shifts)

# Retrieve all shifts, including disabled
all_shifts = system.mes.shift.getAllShifts(True)
print(all_shifts)