
Hi guys,
I'm trying to post the the purchase order line details from postman using odata and I'm getting the following error.
{
"error": {
"code": "",
"message": "An error has occurred.",
"innererror": {
"message": "Write validation failed for table row of type 'PurchPurchaseOrderLineEntity'. Infolog: .",
"type": "Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataValidateWriteException",
"stacktrace": " at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateProcessor.CreateEntity_Save(ChangeOperationContext context, ChangeInfo changeInfo)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateManager.<>c__DisplayClass10_0.b__1(ChangeOperationContext context)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.ChangeInfo.ExecuteActionsInCompanyContext(IEnumerable`1 actionList, ChangeOperationContext operationContext)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.ChangeInfo.TrySave(ChangeOperationContext operationContext)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateManager.SaveChanges()\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataDelegatingHandler.d__3.MoveNext()"
}
}
}
I have tried checking these links but I'm not getting a breakthrough:
- Error creating order line in Dynamics 365 for Oper... - Power Platform Community (microsoft.com)
Below is my paylod
{
"dataAreaId": "XXXX",
"LineNumber": 1,
"PurchaseOrderNumber": "XXXX-PO-000009",
"ReceivingSiteId": "1",
"LineDescription": "XXXXXXX XXXX XXXX",
"ItemNumber": "SKU0000012530",
"DIOTOperationType": "Blank",
"LineAmount": 9687.19,
"PurchasePriceQuantity": 1,
"PurchasePrice": 9687.19,
"PurchaseUnitSymbol": "EA",
"OrderedPurchaseQuantity": 1,
"DeliveryAddressName": "XXXXX XXXXX XXXX",
"ProcurementProductCategoryName": "XXXXXX XXXXX XXXX",
"ReceivingWarehouseId": "TG",
"VendorInvoiceMatchingPolicy": "ThreeWayMatch",
"RequestedDeliveryDate": "2021-09-03T12:00:00Z"
}
Anyone who can help me on this?
Please note the Purchase order header is working without any problem.
Hi Huggins,
It is recommended that you follow the second link for debugging, without which you will not be able to find out what the problem is.
regards