Skip to main content

system.mes.inventory.setInventoryMetadata

Description

Updates the metadata for a given Inventories record by its ID. This includes the notes and spare fields.

Syntax

system.mes.inventory.setInventoryMetadata(inventoryId, notes, spare1, spare2, spare3, name, productionOrderIdOrName)

Parameters

ParameterTypeDescription
inventoryIdString (ULID)The ID of the inventory to update.
notesStringNotes related to the location property value.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.
nameStringThe name of the inventory.
productionOrderIdOrNameStringThe ID or Name of the production order to associate with the inventory.

Returns

Returns a JSON representation of an inventory.

Code Examples

# Update the inventory metadata by inventory ID
updated_metadata = system.mes.inventory.setInventoryMetadata('DDFBVX9Z-01JDTF12WX-8277CPVM', None, '1732833681021216', None, None, None, None)

# Output the updated inventory
print(updated_metadata)