We are trying to create Lot/Serial Allocations for a Manufacturing Move Transaction through the Contract-Based REST API.
Environment:
- Acumatica Manufacturing 24.200.xxx
- Move Entry screen (AM302000)
- Lot/Serial tracked finished good
- Custom endpoint exposing MoveEntry and Generate action
Scenario:
- Create a Move Transaction successfully through REST API.
- The transaction line is created with:
- Quantity = 2
- LotSerialNbr = blank
- Allocations = empty
- In the Acumatica UI, the Generate Lot/Serial Numbers button is enabled and works correctly.
- However, when invoking the Generate action through REST API:
POST /entity/{endpoint}/MoveEntry/Generate
we receive:
PXActionDisabledException: The Generate button is disabled.
Investigation:
- The Move Transaction is in Balanced status.
- Hold = false.
- Quantity exists on the transaction line.
- Allocations are empty.
- LotSerialNbr is blank.
- Generate button is enabled and executable from the UI.
- The exception occurs only through Contract-Based REST API.
Questions:
- Is creation of Move Transaction Lot/Serial Allocations supported through the Contract-Based REST API?
- Has anyone successfully generated lot/serial allocations for AM Move Transactions through REST?
- Is the Generate action dependent on Line Splitting context that is unavailable through Contract-Based REST?
- Is the recommended approach to:
- Directly create AMMTranSplit allocations through the endpoint, or
- Create a custom graph action and expose it through REST?
Any guidance or examples would be appreciated.
http://localhost/AcumaticaERP/entity/ManufactureTest/24.200.002/MoveEntry
{
"Hold": {
"value": false
},
"Details": [
{
"ProductionNbr": {
"value": "AM000200"
},
"OperationNbr": {
"value": "0010"
},
"InventoryID": {
"value": "AMKEURIG45"
},
"Warehouse": {
"value": "WHOLESALE"
},
"Location": {
"value": "R1S1"
},
"UOM": {
"value": "EA"
},
"Quantity": {
"value": 2.00
},
"LastOper": {
"value": true
},
"QtyisScrap": {
"value": false
},
"QtyScrapped": {
"value": 0
},
"Allocations": [
{ "InventoryID": {
"value": "AMKEURIG45"
},
"Location": {
"value": "R1S1"
},
"Quantity": {
"value": 1.00
},
"LotSerialNbr": {
"value": "SRS002365"
},
"LicensePlateNbr": {
"value": "PAL0000000016"
}
},
{ "InventoryID": {
"value": "AMKEURIG45"
},
"Location": {
"value": "R1S1"
},
"Quantity": {
"value": 1.00
},
"LotSerialNbr": {
"value": "SRS002366"
},
"LicensePlateNbr": {
"value": "PAL0000000016"
}
}
]
}
]
}