system.mes.oee.deleteAllOeeAlarms
Description
Deletes multiple OeeAlarms records by their IDs. This cannot delete oee alarms that have references to them.
Syntax
system.mes.oee.deleteAllOeeAlarms(ids)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
ids | 'String[]' (ULIDs) | False | An Array of Ids of the oeeAlarms to delete. |
Returns
If successful, an ApiResponse object is returned with the success flag set to true. If any of the oeeAlarms being deleted have references, an ApiResponse object is returned with details about the encountered error.
| Name | Type | Description |
|---|---|---|
success | Boolean | Indicates if the delete was successful. |
message | String | The reason why the deletion was successful or unsuccessful. |
data | String | The data associated with the deletion. |
error | String | The errors associated with the deletion. |
Code Examples
# Delete multiple oeeAlarms by ID
result = system.mes.oee.deleteAllOeeAlarms([
'01JPAND53P-BZ61RZHZ-V7C6EEHG',
'01JPAND53P-BZ61RZHZ-V7C6EEH1'
])
if not result['success']:
print('Failed to delete oeeAlarms: ' + result['message'])