to get a personalized navigation.
to get a personalized navigation.
Hi,
It seems like adding new lines to a StockTake using operation = insert with PUT v2/StockTake is broken. It used to work just fine and I'm not sure when it stopped working, but it might be related to the improved error handling changes made a while back.
Reproducible test:
Stocktake with only one line. When I try to update this line and add another line with a different location (that is defined in the Physical Inventory Type and valid - works in UI) with the following request:
{
"lines":[
{
"physicalQuantity":{
"value":5.0
},
"operation":"Insert",
"inventoryId":{
"value":"109"
},
"locationId":{
"value":"1A"
}
},
{
"lineNbr":{
"value":"1"
},
"physicalQuantity":{
"value":3.0
},
"operation":"Update"
}
]
}
I get the following error: "Error: An error in processing of field Location value 1A Inventory error: This combination is already in use in line number 2."
It seems like it fails validating against it self.
Solved! Go to Solution.
Fix released a while back. Seems to be working like expected again.
The issue only seems to be happening when there are operations after the insert.
For example this payload goes through as it should:
Whereas this causes issues:
The same issue occurs if there are several inserts in the same payload.
For the moment, the workaround is to only include one "insert" line per payload, and always as the last operation.
We'll open a case with the development team so they can investigate it.
Thank you.
Thanks.
Additional information:
It seems like it fails if the request contains a line after a line with operation = insert.
Update - Insert = OK
Update - Update - Insert = OK
Insert - Update = Error
Update - Insert - Update = Error
Update - Insert - Insert = Error
Hi,
We'll have a look at it and get back to you.
Thank you.
Copyright © 2022 Visma.com. All rights reserved.