Skip to main content

system.mes.inventory.newMoveRequest

Description

Generates an empty Move Request to provide the structure required by the API to save a new record into the database. This method must be combined with the move method in order to persist the record.

Permissions

This method does not require any permissions.

Syntax

system.mes.inventory.newMoveRequest()

Parameters

ParameterTypeNullableDescription
None--This method does not take any parameters.

Returns

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

KeyDefault Value
typeMOVE
quantitynull
unitOfMeasureSymbolnull
lotIdOrNamenull
materialIdOrPathnull
sourceLocationIdOrPathnull
destinationLocationIdOrPathnull
operationIdnull
inventoryOperationIdnull
productionOrderIdOrNamenull
materialReasonCodeIdnull
startDateCurrent Time
endDatenull
ongoingfalse
destinationInventoryNamenull
notesnull
spare1null
spare2null
spare3null

Code Examples

# Generate the object structure for a new move request object with no initial arguments
newRequest = system.mes.inventory.newMoveRequest()

# Set basic attributes for the new move request
newRequest['materialIdOrPath'] = 'Bottle/Milk'
newRequest['sourceLocationIdOrPath'] = 'DairyFarm'
newRequest['destinationLocationIdOrPath'] = 'DairyCo'
newRequest['quantity'] = 610
# (You can continue setting other properties as needed here)

# Move the request
movedRequest = system.mes.inventory.move(**newRequest)

# Output the JSON representation of the moved request
print(movedRequest)