Benedikt Bergmann wrote an insightful blog post on making a nested editable grid read-only in Dynamics 365, a requirement for one of his projects. He aimed to display subgrid information from a table two relations away, with no provision for direct editing. In responding to that, Benedikt devised an approach wherein he used editable grid but made sure it only displayed information and was not editable directly.
He framed an exemplary scenario where an event registration is built in Dataverse. This involves multiple "Demo Attendee" rows associated with a custom "Demo Event" table related to a contact. Every contact here is linked to an Account. The goal, thus, was to display all "Demo Attendee" rows associated with the account in question.
To make this nested grid read-only, the script needs to be added to the event, meaning our script must be configured rightly. As Benedikt noted, this scripting configuration needs to be done in the classic UI because event configuration on subgrids isn't yet available in the maker portal. He further demonstrates how to configure the script for the first and second level of the subgrid.
Interestingly, Benedikt concludes that with a small script and some configuration, a nested editable grid can be rendered read-only, a method much easier and faster than creating a PCF for it. For more insights and tactics, follow this link.
The ability to display subgrids of information, specifically from tables with multiple relational stages, is a function very much valued. The concept of rendering the grid data uneditable, directly on the display or grandparent, is an exciting point to revise. It is a stepping stone towards achieving tailored functionality within data platforms. The center of focus here is Microsoft's Dynamics 365, an expansive platform involving Power Apps, dataverse, and the likes, forming a solid foundation for a custom built event registration scenario, as proposed in the blog post.Read the full article Read-only nested editable grid in Dynamics 365
In this article, we delve into the fascinating world of creating a read-only nested grid that can be edited when using Dynamics 365. This blog post is based on a task my coworker brought to my attention. In one of our client's projects, we had to design a subgrid that could display details from a table that was two relations away. Here, we will provide a step-by-step guide on how to structure a nested editable grid in the dataverse.
One of our customers had a condition where they had to display information from a table with two relationships away. This is achievable through the editable grid. Nevertheless, the subgrid gets editable. In our client's case, however, they wanted to just visualize the information and not make it editable on the grandparent.
For the purpose of this article, let's envision we have an Event registration developed in the dataverse. A user can have numerous “Demo Attendee” rows that relate to a different custom table named “Demo Event”. Each user is connected to an Account. We want to exhibit all “Demo Attendee” rows associated with the Account in question. Consequently, our table structure is as shown in the diagram.
Initially, I thought that the OOB editable grid could not solve our dilemma. Therefore, we were left with no choice but to build a Power Apps Component Framework for it. After a bit of digging, I wasn’t able to find any PCFs that did what we needed. It was strange considering we couldn't possibly be the first ones facing such an issue. I then sought help from the Power Platform Level Up discord group, which I recommend you join as it is an excellent platform for Power Platform developers to discuss questions and offer solutions.
I expect the nested subgrid to be configured as it should. In order to integrate our script in the event and thereby render the nested grid read-only, we have to establish it. However, it needs to be done in the classic UI since event configuration on subgrids is unavailable in the maker portal. Consequently, open the form in question and select “Switch to classic”.
In the new window, we'll navigate to the Events tab by double-clicking on it. Subsequently, add a library by clicking "+ Add", and search for your web resource and add it as a library. After you've done that, the Events tab should look something similar to this.
To incorporate the script for the first level of the subgrid, on the Events tab we scroll down and select the first level table in the “Entity”, and “onRecordSelected” as the event. Then click “+ Add” to insert a new function to the event. And on the next screen select the library just added, inscribe the name of the function and tick the box to pass the execution context to the function.
For the second level, we perform the exact same steps as we did for the first level only we select the table from the second level. Ultimately, save and publish the form and you should be good to go.
To sum it all up, forming a nested editable grid that is read-only is as simple as having a minor script and certain configurations in place. This is much more efficient than creating a PCF.
I'm sure this blog post will be of great assistance to you when implementing a read-only nested editable grid in the dataverse. Do feel free to contact me if you come across any additional questions or input.
Dynamics 365 nested editable grid, Read-only grid Dynamics 365, Dynamics CRM editable grid, Dynamics nested grid, Dynamics 365 grid customization, Microsoft Dynamics read-only grid, Editable nested grid Dynamics, Dynamics 365 grid editing features, Nested grid read-only options, Custom grid Dynamics 365.