我正在尝试使用 odata 从邮递员发布采购订单行详细信息,但出现以下错误。
{
"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.<CreateEntity>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.<SaveChangesAsync>d__3.MoveNext()"
}
}
}
我试过检查这些链接,但我没有取得突破:
- https://powerusers.microsoft.com/t5/Connecting-To-Data/Error-creating-order-line-in-Dynamics-365-for-Operations/td-p/11927
- https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/378486/error-while-submitting-po-from-external-system-odata-d365-佛
下面是我的有效载荷
{
"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"
}
任何人都可以帮助我吗?
注意:采购订单标题正常工作。