In the world of Model-Driven App, it's imperative to maintain the functionality of the view while tweaking the visibility of certain columns. In his blog post, Linn Zaw Win highlights such scenarios and presents some solutions.
First, he mentions hiding the sorting column. As per the usual setup, this column would show up as a subtitle in the lookup dropdown. Although necessary for the view's functionality, its visibility could be unwanted. This issue was addressed by Kailash Ramachandran who found a workaround by manipulating the LayoutXml using the View Designer tool in XrmToolBox.
Another common issue pertains to the SharePoint documents in applications: hiding the Path column in the associated view. If done so in the view designer, the grid control fails to render, indicating its importance for the system's functionality.
When attempting to use XrmToolBox's View Designer tool, Linn Zaw Win encountered a NullReferenceException error. Probably, this was due to the tool being last updated in 2016 and it might have compatibility issues with the newer versions of the view schema.
The recommended solution was to update the LayoutXml manually. This involves the creation of a new solution and adding the view into the solution. The next steps include exporting, extracting the solution.zip file, and editing the customizations.xml. Changes can be made to the 'relativelocation' cell and the width attribute can be changed to 'ishidden="1"'. It effectively hides the column while maintaining its role in the grid control.
The Model-Driven App allows teams to create a model for applications that bridge the gap between business data and the end user. The model is responsible for the generation of procedures, controlling both the form and function of the application. However, optimizing the visibility of various columns for efficiency, while preserving their roles in the system, creates a constant need for inventive solutions.
Whether it’s handling visibility in the lookup dropdown or handling SharePoint documents related tasks, developers must manage competing demands between limited visibility and functional requirement. Despite the challenges, the use of tools like View Designer in XrmToolBox and manual manipulation of LayoutXml continues to shed light on potential solutions. As the platform and tools continue to evolve, we can expect improved compatibility and simpler solutions for these common issues in Model-Driven App development.
Read the full article Hiding a Column Without Removing From a View in Model-Driven App
Understanding the process of obscuring a column without removing it from a view in the model-driven app can be of immense help in many instances. Doing this often becomes a necessity when the column you want to hide is instrumental to the view's functioning, hence removing it isn't an option. The manipulation of visibility doesn't affect its functionality, making this technique all the more useful.
For instance, hiding the column utilised for sorting activities can help achieve better aesthetics without compromising structure. This is because despite its hidden status, it appears as a subtitle in the lookup dropdown, being the second column of the lookup view. Professional bloggers, like Kailash Ramachandran, have covered the solution comprehensively in their blogs.
Another relevant scenario involves the Path column in the associated view of the SharePoint documents in the Microsoft's custom application. The need to hide this is often a common query raised in various user forums. A crucial tactic here is to remove the Path column from the view in the view designer, to ensure the grid control renders effectively.
However, the Document Associated Grid, when loaded with the View Designer tool in XrmToolBox, can trigger a NullReferenceException error, making it impossible to save the view. The incompatibility may be because the tool's latest update was in 2016, rendering it likely to not support newer properties introduced in the latest versions of the view schema.
Given that the View Designer tool is incompatible with the Document Associated Grid, the only feasible solution is to manually update the LayoutXml. This involves creating a new solution, adding the view into the solution, exporting and extracting solution.zip file and editing the customizations.xml. In the XML file, we locate the cell element for Path, and replace the width attribute with (ishidden="1"). We also have the option to remove the entire element.
The column will become invisible to the view by following these steps, but will still exist in the <fetchxml>, ensuring that the grid control remains functional. Mastering these techniques adds to the efficiency and aesthetic value of the model-driven applications, and hence making these tools useful for any Microsoft professional.
Hiding Column, Column View, Model-Driven App, Remove Column View, App Development, Customizing App View, Visibility Settings Model-Driven App, App Design Tips, Column Management Model-Driven, Microsoft Model-Driven App