Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 release wave 1Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 TimelineWatch the 2020 Release Wave 1 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 | Upcoming TechTalks
I need to know about the AOT query and how the Groupby is working in it.
Here is my Query i have created the relation manually For Salestable.salesid==salesline.salesid, salestable.custaccount== custtable,accountnum. when i use group by for Salestable.custaccount only the data for the other fields in the grid is not populating. when i use groupby for all the fields the data are populated on the grid, but it was not worked properly The custaccount field shows duplicate data after using Groupby . How the Groupby works and still i dont know much about that.
If you group records by CustAccount, you'll get just a single record for each customer. You won't get anything for other fields, such as Unit, because there may be several different units used on orders of this customer. If you want to get a value, you must either include it in grouping (then you'll get one record for each Customer-Unit combination), or you must use an aggregate function. For example, you can use SUM to summarize amounts, COUNT to count the number of lines and MAXOF to get the highest status.
Yeah I have added the other fields also in the Group by. But it gives me the Repeated data for the CustAccount field. It gives me the Data For each Salesid. Here see the below image. It was grouped by salesid only. But i need CustAccount Should be Grouped.
Yes, that's the expected behavior. As I said in my example, if you group by both CustAccount and Unit, you'll get one record for each combination of CustAccount and Unit. If a customer (Cust1) have orders with three units (e.g. Piece, Meter and Box), you'll get three records (Cust1-Piece, Cust1-Meter and Cust1-Box). If you don't want that, don't do that. If you want to group by CustAccount only, don't group by other fields.
But then you must decide how you want to aggregate the data. You can't show all three units in the single field - as I mentioned, you must use on of the aggregate functions. With units, there is probably no meaningful aggregation, but I gave you three different examples in my previous reply.
Forget About the Other Three fields Let us Consider CustAccount and Salesid Field only. I have used SalesTable.CustAccount For Group by but it shows Multiple records in the CustAccount Field. Is this necessary to use Aggregate function in Groupby ?
It's not possible. If you grouped by CustAccount only, you would get one record per CustAccount (and no value in SalesId). That's by definition. If you get repeated CustAccount, you're not grouping by CustAccount only.
You must use aggregate functions for fields that you don't group by but you want to get values for them. Please read again the explanation and examples above.
Business Applications communities