Skip to main content

system.mes.inventory.newSplitRequest

Generates an empty non-persisted Split Request to provide the structure required by the API to save a new record into the database. This method must be combined with the split method in order to persist the record.

Syntax

system.mes.inventory.newSplitRequest()

Parameters

ParameterTypeDescription
None-This method does not take any parameters.

Returns

Returns a JSON representation of the newly created Split Request object. The following is a list of keys and default values:

KeyDefault Value
typeSPLIT
quantitynull
unitOfMeasureSymbolnull
sourceLotIdnull
sourceLocationIdOrPathnull
destinationLotNamenull
operationIdnull
productionOrderIdOrNamenull
materialReasonCodeIdnull
destinationInventoryNamenull
notesnull
spare1null
spare2null
spare3null

Code Examples

# Generate the object structure for a new split request object with no initial arguments
new_request = system.mes.inventory.newSplitRequest()

# Set basic attributes for the new split request
new_request['sourceLocationIdOrPath'] = 'DairyCo'
new_request['sourceLotId'] = '01JJCQEJYG-E31FHVTF-JB6WEJTC'
new_request['destinationLotName'] = '5db685a7-2096-449a-b96c-effb3739e021'
new_request['quantity'] = 610
# (You can continue setting other properties as needed here)

# Split the request
split_request = system.mes.inventory.split(**new_request)

# Output the JSON representation of the split request
print(split_request)