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, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
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
How do I reference a field in a self join? I have a AOT query which I am building a data provider for.
The query is as follows:
Now I have a self join on Ecorescategory to get the category and parent category which is in the field 'Name'.
My DP uses RecordInsertList however in the query run I do not know how to reference it and the name I have given it in the query does not work for the table.
ItemVariantView ItemVariantView = _queryRun.get(tableNum(ItemVariantView));
ProductPricingReportTempTable.ItemId = ItemVariantView.ItemId;
ProductPricingReportTempTable.VariantId = ItemVariantView.VariantId;
PriceDiscTable priceDiscTable = _queryRun.get(tableNum(PriceDiscTable));
ProductPricingReportTempTable.AccountRelation = priceDiscTable.AccountRelation;
ProductPricingReportTempTable.Amount = priceDiscTable.Amount;
ProductPricingReportTempTable.Currency = priceDiscTable.Currency;
ProductPricingReportTempTable.FromDate = priceDiscTable.FromDate;
ProductPricingReportTempTable.ReasonCode = priceDiscTable.ReasonCode;
ProductPricingReportTempTable.ToDate = priceDiscTable.ToDate;
EcoResCategory ecoResCategory = _queryRun.get(tableNum(EcoResCategory));
ProductPricingReportTempTable.Category = ecoResCategory.Name;
Hope that makes sense?
You can try to use _queryRun.getNo() instead of get().
Another option is utilizing the second parameter of get: _queryRun.get(tableNum(EcoResCategory), 2).
Business Applications communities