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
does D365 support right outer join?
I want to show Batch orders in my report. Some of these batch orders create purchase orders. Some of them do not. If they create purchase order then I want to show purchId and some purchLine information as well. PurchLine has a relation with ProdTable but ProdTable does not. So purchLine is the parent table which prod table must be join to. However I also want prodTable records which are not in PurchLine. Therefor it is rational to use right outer join between these two table.
You should be able to use "notexists join", see example below:
Please take time to click 'Yes' against the answers that help you guide in right direction to help other community members.
I want ProdTable records which are in purchLine as well. I do not want records which are only in prodTable. I want all records in ProdTable whether they are in PurchLine or not. if They are in purchline I want to show Extra information from Purch line table as well.
Assuming you are not writing X++ code for some functionality or a custom SSRS report,
D365 does not support joins as D365 is the application and not the database. If you would like to make queries on the data you would have to export your data via the data entities to a BYOD, which would be an Azure SQL DB. Reporting via odata on these tables is not recommended.
Microsoft (Azure) SQL is the database and this supports left / right Outer joins. However in general An Outer join (without left/ right) Will work as well, since left/ right is mostly determined by how you write the statement.
Did you try using outer join on Prodtable and Purchline ?
as I understand Outer join in d365 means left outer join which does not meet my requirement. Am I right?
I am writing x++ code and using query build range
Then I would say that a select from the prodtable with An Outer join to purchline would be the solution
Your understanding is correct. Keeping punchline as parent table is not going to help you try other way round . If you are not able to achieve results in a single query try splitting it in to two different ones in order to generate report data .
The Outer keyword returns all rows from the table that is named first, even if rows have no match in the table that is named second. This join is a left outer join, even though there is no left. There is no right outer join.
So, you can select your "right" table, and then outer join "left" table.
Please refer :https://community.dynamics.com/365/financeandoperations/b/dynamicsaxhints/posts/how-joins-in-x-select-statement-are-translated-into-t-sql
select prodTable outer join purchLine
where (add join conditions between prodtable and purchLine)
&& purchLine.PurchId = givenPurchId
It should give you required result. Are you not seeing correct results with this?
Refer - docs.microsoft.com/.../select-statement-with-an-outer-join
Business Applications communities