Notifications
Announcements
No record found.
Hi,
How can i get the query of a certain data entity?
Hi
Go to the database, find the data entity in the views section of your database. here you will find the complete query of your data entity.
Hi sheikh,
Is it normal that the query is wrong? I mean When i try to run it i got errors. So i had to edit few lines in order for the query to run
For example after inner join with a table there was no on conditiin directly after it it was after few lines
Hi IntegrationBeginner,
You asked a question for some general information and now it appears that you have a specific issue. Can you share more details about what you are working on and what error you get?
Hi Andre,
I took part of the query. As you can see T7 doesn't have an ON condition for the inner join
If i move the on condition highlighted in yellow next to T7 then the query for the entity runs (as this is the relation on the entity itself)
But why is it wrong from the first place?
I am not sure what exactly is your case, but in general, with the OOTB data entity, the query should run properly without having any issues.
If this is a custom data entity, then you need to check, how you developed the data entity. the data entity is actually viewed in the database, so what you will develop will be shown as it is in the database.
Hi IngegrationBeginner,
what you see in the database is created by D365 based on the entity definition that you have developed in Visual Studio. So if you see some issues here, you must figure them out and fix them in the entity definition in the Visual Studio.
Hi nikolas and sheikh,
But how come the entity is working correctly and i get no build errors
I mena what should i change if i can't see any errors?
Also i noticed that in the standard data entity ledgerjournalentity... There was no on condition next to the inner join and it was done later but it didn't fail when running it
You're saying that the entity is working correctly. So what exactly are you trying to achieve now? Do you have a business problem that you're trying to solve?
Anyway, the view that you see in the database is the one that D365 creates from your entity. But the entity execution in D365 is more than just that view - so you can't always expect 1:1 results from running the entity and querying the SQL view.
Hi Nikolaos,
So it's ok that the query is wrong even though the entity is working?
Yes i'm trying to solve the problem described in this question.
I'm getting repeated records when using recurring integration in a different environment
community.dynamics.com/.../repeated-records-in-recurring-integration
I forgot to add to the previous reply the query error
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 646 Most Valuable Professional
André Arnaud de Cal... 529 Super User 2025 Season 2
Sohaib Cheema 285 User Group Leader