My Products
Help
robertwes
PARTNER

Strange message on PurchaseOrder update

by robertwes
Error: Updating  'Purchase order line' record raised at least one error. Please review the errors.\r\nThe quantity must be above 0.


 

{
  "hold": {
    "value": false
  },
  "lines": [
    {
      "operation": "Update",
      "lineNumber": {
        "value": 1
      },
      "inventory": {
        "value": "065-04594"
      },
      "orderQty": {
        "value": 1
      },
      "unitCost": {
        "value": 500
      }
    }
  ],
  "note": {
    "value": "test xxxxxxxxxxx"
  }
}

 

3 REPLIES 3
Yıldırım
VISMA

by Yıldırım (Updated ‎22-06-2023 14:33 by Yıldırım VISMA )

Hello, 

what is the current value of the line that you'd like to update ? 

 

- You can try adding UOM since InventoryID is also included in the line.  In the ERP, the system first removes all the line values, then fetching the data accordingly. 

- If you would only like to update quantity, please just send OrderQty in the request. 

- If you need to update the whole line then please try deleting the line first and inserting together with all the inventory, uom, orderqty etc values.

robertwes
PARTNER

by robertwes (Updated ‎22-06-2023 14:40 by robertwes PARTNER )

The current value is the same  (1).
I actually just want to update unitCost, note and hold, but then i get an error that say quantity have to be > 0.
That is why i added orderQty.

Yıldırım
VISMA

by Yıldırım

This can also be related to that, we're unable to edit Purchase Order when it's Hold:False so I'd recommend trying updating the line by sending only the values for the fields you'd like to update, then sending another PUT for Hold:false.