Skip to main content

system.mes.shift.deleteShiftRecord

Description

Deletes a Shift Records record by its ID. This cannot delete a record with references to it.

Syntax

system.mes.shift.deleteShiftRecord(id)

Parameters

ParameterTypeNullableDescription
idStringFalseThe ID of the shift record to delete.

Returns

If successful, an ApiResponse object is returned with the success flag set to true. If unsuccessful, an IllegalArgumentException or ConstraintViolationException is thrown. If the record being deleted has a reference, an ApiResponse object is returned with details about the error.

NameTypeDescription
successBooleanIndicates if the delete was successful.
messageStringThe reason why the deletion was successful or unsuccessful.
dataStringThe data associated with the deletion.
errorStringThe errors associated with the deletion.

Code Examples

# Delete a shift record by ID
system.mes.shift.deleteShiftRecord('01JAP8RJBN-8ZTPXSGY-J9GSDPE1')