Several years ago we made a copy of VendorInvoiceLineEntity and added VendInvoiceInfoLine_Project as a datasource with an Outer Join. This table won't always be populated; it depends on the data we send via Odata. This all works fine but we'd like to instead now extend the VendorInvoiceLineEntity and add VendInvoiceInfoLine_Project so that we're not working with a copy of the data entity. We've added VendInvoiceInfoLine_Project as a datasource in the extension: This is the same as what's working in our copied data entity. When we send a message that doesn't contain any values for fields in VendInvoiceInfoLine_Project, we’re getting a ValidateWrite error on the VendInvoiceInfoLine_Project table: Microsoft.Dynamics.Ax.Xpp.ViewDataSourceValidationException: 'validateWrite failed on data source 'VendInvoiceInfoLine_Project (VendInvoiceInfoLine_Project)'' However it shouldn't be trying to write a record in this situation and the same Odata message works as expected with our copied data entity. Debugging, we compared the two data entities in mapEntityToDataSource and insertEntityDataSource. They look similar in mapEntityToDataSource: In insertEntityDataSource The _operation value in our copied data entity is None The _operation value in our extended data entity is insert Could anybody shed some light on why the extended data entity is behaving differently. Why is the operation set to Insert when there's no data in the table to insert?
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.