Error when updating record for custom data entity(PO- HeaderLine)

Hi Techies,

I have created one custom data entity for Purchase order import/Export. added main data source as purchTable and joined table as purchline(inner join). entity key is (customPONumber + customLineNumber).

Note: customer po number and custom Po line number are customized field on purchtable and purchline respectively. I kept these fields mandatory on data entity. but there is no index with this fields neither on purchtable nor on purchline.

Import is fine but getting error for update. and this error only coming if PO is confirmed and for confirmed po we try to update line info such as qty or price.


“message”: “An error has occurred.”,
“innererror”: {
“message”: “Write failed for table row of type ‘Custom_PurchaseOrderEntity’. Infolog: Info: Cannot edit a record in Purchase order lines (PurchLine).\nAn update conflict occurred due to another user process deleting the record or changing one or more fields in the record…”,
“type”: “Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataWriteException”,
“stacktrace”: " at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.UpdateProcessor.UpdateEntity_Save(ChangeOperationContext context, ChangeInfo changeInfo)\r\n at Microsoft.Dynamics.Platform.Integration.Services.OData.Update.ChangeInfo.b__1_0(ChangeOperationContext operationContext)\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()"