Hello
I’m trying to update SalesOrder PurchasingDetails through this url: PUT method https://gtp.acumatica.com/entity/DefaultEndPoint/23.200.001/SalesOrder/?$Expand=Details
using this script:
{
"id": "91bdadf9-ef21-ef11-835e-06ae6affe5a5",
"Details": [
{
"id": "c5ce115a-f021-ef11-835e-06ae6affe5a5",
"PurchasingDetails":
[
{
"POOrderType":{"value":"SO"},
"POOrderNbr":{"value":"Code-000396360"},
"POOrderLineNbr":{"value":1},
"Selected":{"value":true}
}
],
"VendorID":{"value":"V10156"}
}
]
}
i getting this error message:
"innerException": {
"message": "An error has occurred.",
"exceptionMessage": "Purchase Order Line (Order Type = SO, OrderNbr = Code-000396360, LineNbr = 1) cannot be found in Purchasing Details for Sales Order line (LineNbr = 1).",
"exceptionType": "System.Exception",
"stackTrace": " at PX.Objects.EndpointAdapters.DefaultEndpointImpl22.LinkSOandPO(SOOrderEntry soOrderEntry, SOLine transaction, EntityImpl targetEntity, EntityImpl[] purchasingDetailsEntities)\r\n at PX.Objects.EndpointAdapters.DefaultEndpointImpl22.SalesOrderDetail_Update(PXGraph graph, EntityImpl entity, EntityImpl targetEntity)"
i retrieved this data using this url get request: https://gtp.acumatica.com/entity/DefaultEndPoint/23.200.001/SalesOrder/SO/Code-000396360?$Expand=Details
i already created Purchase order for that order using this script:
url POST https://gtp.acumatica.com/entity/DefaultGTPEndPoint/23.200.001/PurchaseOrder/approve
{"entity": {
"VendorID": {
"value": "V10156"
},
"Location": {
"value": "04"
},
"Type": {
"value": "Normal"
},
"OrderNbr": {
"value": "<NEW>"
},
"VendorRef": {
"value": "PO060324-2"
},
"Description": {
"value": "Test"
},
"Owner": {
"value": "art"
},
"Details": [
{
"InventoryID": {"value":"BC3001NVY-XL"},
"OrderQty": {"value": 1.00},
"UnitCost": {"value": 59.99},
"POLineNbr": {"value": 3},
"POOrderNbr": {"value": "Code-000396360"},
"ReceiptQty": {"value": 1}
}
]
}
}
Thank you for your help