Hello,
I am trying to programmatically use the Grid Group by feature in Dynamics 365 F&O to initialize a grid grouped by a certain column instead of the user selecting it from the user interface. I tried using the Group By grid property but it has no effect. Is it possible to use the new grid group by feature from the code and if so can it be done on multiple levels (multiple columns) to initialize the grid. Kindly advise. Thank you.
Grid capabilities - Finance & Operations | Dynamics 365 | Microsoft Docs - for reference about the new Grid Group by feature.
Hi Anthony90288,
The UI feature can also support to group by multiple columns.would you specify your business requirements?
Hi Judy,
I am aware that the UI feature allows grouping up to 5 columns. However, my requirement is to have my grid already be grouped by a certain column programmatically on the initialization of my grid so that the user doesn't have to do it from the UI. I tried the "group by" grid property but it has no effect.
Why don't you just save the view and mark it as the default view?, you will achieve your proposal without a single line of code
Hi Mariano,
Thanks for your suggestion. I am also aware of using saved views and setting it as default. However, I have logic where users can change a certain field value which triggers execution of a query which uses a table that is the root data source of the grid and thus grid contents will change so the grouping will be undone each time it is executed. Therefore that is why I want to do it through X++ if possible. I basically want to replicate the group by functionality on the grid UI inside my executequery method if possible
Hey Anthony,
did you find a solution for this in the meantime? I'm facing exactly the same requirenment.
Thanks in advance.
Sebastian
Hi Sebastian,
Refer to the below thread and see if it helps.
https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/478358/method-to-override-which-trigger-after-form-is-fully-loaded/1315898
Thanks,
Girish S.
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 Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 1,922
André Arnaud de Cal... 835 Super User 2025 Season 2