I do love the fresh we’ve had with V9.0 of Dynamics 365, the forms are clearer and the views are easier to read.
Except this readability has a trade off that some items now occupy slightly more screen real-estate. Generally this is a happy trade off that causes no issues. But I have seen a challenge when we display associated views in the left panel of Unified Service Desk.
Below you can see that in my application I display is list of associated cases in my left panel. (Actually this “space” is called LeftPanelFill.) The problem here is that my case view doesn’t fit nicely. Depending on your expected resolution and the length of your agent scripts you may find you have some “spare” unused space below the associated views. In this post I will show you a simple, yet hopefully useful, approach to quickly alter the height of these panels to use the full space available.
To do this I need to create a simple action call. The one I created is below.
The details of this action are as follows;
|Name||Main Layout – Set Visual Property (LeftPanelFill, Height)|
|Order||I don’t care! So left blank.|
|Hosted Control||Main Layout
Your control may have a different name! This is my hosted control that has the component type of “Panel Layout”. Yours maybe called “Custom Layout” or something similar.
This action allows me to dynamically set visual (UIElement) properties, including height, width, visibility etc.
The details in the data field allow me to define that it is the LeftPanelFill I want to alter, that it is the “Height” I want to change and then its value.
Now, the value you pick is going to change dependant on the screen resolution you want to work with and the available space. Your agent scripts expand and shrink! So I have picked my longest script and picked a value that uses the remaining space. For me that is 450, your value might need to be slightly higher or lower.
Having created my action I needed to decide when to trigger it. I simply added the action to the BrowserDocumentComplete event of my associated cases hosted control. Meaning that whenever my cases associated view was loaded it would have an appropriate height.
Below you can see my improved layout. For me this not only looked better but meant my agents could see more recent cases without needing to scroll. Meaning this change also gave a more functional UI.
I know this is a simple change, but hopefully you will find seeing this useful. Enjoy!