Skip to main content
Version: V3 (Ignition 8.3)

system.mes.inventory.operation.cancelInventoryOperation

Description​

Cancels an Inventory Operations object. This function finds the currently running inventory lot record associated with the specified inventory operation, sets its end time to the current time, and updates its status to CANCELLED. The inventory operation status is also updated to CANCELLED. This effectively terminates an active operation without recording additional inventory quantity changes.

Permissions​

This method requires the INVENTORY_OPERATION.EXECUTE permission.

Syntax​

system.mes.inventory.operation.cancelInventoryOperation(inventoryOperationId)

Parameters​

ParameterTypeNullableDescription
inventoryOperationIdString (ULID)FalseThe ID of the inventory operation to cancel.

Returns​

Returns a JSON object of the updated inventory lot record with the cancelled operation details, including the end time and cancelled status.

Example Usage​

# Cancel the inventory operation
cancelledLotRecord = system.mes.inventory.operation.cancelInventoryOperation('01JPAND53P-BZ61RZHZ-V7C6EEHG')

# Output the inventory lot record of the cancelled inventory operation
print(cancelledLotRecord)