Skip to main content

system.mes.operation.deleteAllOperations

Description

Deletes multiple Operations records by their IDs. This cannot delete operations that have references to them.

Syntax

system.mes.operation.deleteAllOperations(ids)

Parameters

ParameterTypeNullableDescription
idsString[] (ULIDs)FalseA list of IDs of the operations to delete.

Returns

If successful, an ApiResponse object is returned with the success flag set to true. If any of the operations being deleted have references, an ApiResponse object is returned with details about the encountered 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 multiple operations by ID
result = system.mes.operation.deleteAllOperations([
'01JPBCPKSR-972W3V0Y-H00NNSKQ',
'01JPBCPKSR-972W3V0Y-H00NNSK1'
])

if not result['success']:
print('Failed to delete operations: ' + result['message'])