Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, Power Apps, Power Automate, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
We have a scenario where we need to call Purchase Order request change through OData, can you tell me which event handler or method i should use to PurchPurchaseOrderLineV2Entity trigger VersioningPurchaseOrder.createChangeRequest().I have already tried some they are PurchPurchaseOrderLineV2Entity_onValidatedWrite() & PurchPurchaseOrderLineV2Entity_onPostedLoad() but every time we are getting same error as below
"message": "An error has occurred.",
"message": "Write validation failed for table row of type 'PurchPurchaseOrderLineV2Entity'. Infolog: .",
"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__DisplayClass5_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__2.MoveNext()"
The error says that the data you provide isn't valid. Put a breakpoint to PurchPurchaseOrderLineV2Entity.validateWrite() and check out where it's failing.
Thanks for the reply Martin,
Tried debugging PurchPurchaseOrderLineV2Entity.validateWrite(), it returns false through below statement. it seems like PO RecVersion is change after createChangeRequest() & system is checking for any updates on PO. correct me if i am wrong.
if (!PurchTable::find(this.PurchaseOrderNumber).checkUpdate(true, true, true))
Business Applications communities