on 2022 Nov 10 2:16 PM
Hi Experts,
We are working with SAP Business one Service layer and we need to update the sales order lines and change the batch number using the below body. Please note that on the sales order there is already a selected Batch number lets say TEST2 with quantity 10 and we need to change the butch number to TEST1 with quantity 10.When i use the PATCH method we get an error response Cannot add row without complete selection of batch/serial numbers.
SAP Business one version: 10 FP 2102
{ "DocumentLines": [ { "LineNum": 0, "ItemCode": "TEST", "Quantity": 10, "WarehouseCode": "01", "BatchNumbers": [ { "BatchNumber": "TEST1", "ManufacturerSerialNumber": null, "InternalSerialNumber": null, "ExpiryDate": "2023-09-15", "ManufacturingDate": "2021-09-16", "AddmisionDate": "2022-04-11", "Location": null, "Notes": null, "Quantity": 10, "BaseLineNumber": 0, "TrackingNote": null, "TrackingNoteLine": null, "ItemCode": "TEST", "SystemSerialNumber": 6 } ] } ]}
Thank you for your time.
Hi xenios,
For this specific scenario, we would ask you to use the header B1S-ReplaceCollectionsOnPatch with value true.
B1S-ReplaceCollectionsOnPatch is just for the scenario where you want to delete a line or update existing lines at the same time.
In other words, it is to update the matched lines and delete the unmatched lines.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{
"CardCode": "S0003",
"Comments": "创建自Service Layer",
"DocumentLines": [
{
"ItemCode": "D0100285",
"Quantity": 2.0,
"Price": 122.13,
"BatchNumbers": [
{
"BatchNumber": "aaa",
"Quantity": 1.0
},
{
"BatchNumber": "bbb",
"Quantity": 1.0
}
]
},
{
"ItemCode": "D0100285",
"Quantity": 3.0,
"Price": 122.13,
"BatchNumbers": [
{
"BatchNumber": "ccc",
"Quantity": 2.0
},
{
"BatchNumber": "ddd",
"Quantity": 1.0
}
]
}
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear chenhua123,
Thank you for your reply.
Our scenario is that we want to update the batch number for example.
Original order:
{
"CardCode": "S0003",
"Comments": "创建自Service Layer",
"DocumentLines": [
{
"ItemCode": "D0100285",
"Quantity": 2.0,
"Price": 122.13,
"BatchNumbers": [
{
"BatchNumber": "aaa",
"Quantity": 2.0
}
]
}
]
}
Update the order like:
{
"CardCode": "S0003",
"Comments": "创建自Service Layer",
"DocumentLines": [
{
"ItemCode": "D0100285",
"Quantity": 2.0,
"Price": 122.13,
"BatchNumbers": [
{
"BatchNumber": "bbb",
"Quantity": 2.0
}
]
}
]
}
Thank you in Advance.
User | Count |
---|---|
91 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.