web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Extending VendorInvoiceLineEntity to add optional table

(1) ShareShare
ReportReport
Posted on by 122
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?
Categories:
I have the same question (0)

Under review

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Subra Profile Picture

Subra 124

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 98 Super User 2026 Season 1

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 85 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans