Let's check out how to do that !
First of all, when you place any Quick View Form on the Main Form it will look like below Image. For this example, I have put Contact quick View form on Opportunity's Main display form. You can see the extra spaces around the labels and inside the Quick View form in below Image. Now, as a developer we need to get rid of it if Client is not happy with this design.
The Good News is, It’s possible to hide this unnecessary space. But I must tell you, it’s not a out of box supported customization in Dynamics 365 services. I have found this way after a lot of research on various blog sites. The way to get rid of this white spaces is to write custom CSS classes which will overwrite the default CRM CSS design to remove these white spaces and make the form more cleaner in look. We need to use CRM web resources for CSS and JS to achieve the goal.
To start with, when you add a Quick View Form to your form, you need to give it a name. It doesn’t matter what you put into the field. It does however help if you put in something logical. In example, if you put a Quick View Form on the Opportunity form with the Contact Detail, you can use "Quick_Contact_Information", Show something like this.
Now, Next step is to create two Web Resources. This can be done from any form (Insert->Web Resources -> New
In this code, you need to replace "Quick_Contact_Information", with the name you gave the Quick View Form.
1. Give the Web Resource a name and Type (choose Style Sheet (CSS)):
Click Text Editor next to Style Sheet (CSS) and include the below code and Save Web Resource. Please note that we are using the Name we mentioned while adding Quick View Form on the Main form. You can use your form name instead.
In this code, you need to replace “ContactDetail.css” with the name you gave the CSS WebResource.
Your Quick View Form is now perfectly in sync with all the other fields and sections without any an Additional white spaces. This will work like a Charm on your Main Form. Your Main Form will look like,
Wasn't it now look pretty cleaner and similar to normal Form fields ?? Well I think it does. So you can use this technique if your client it pursuing you to show quick view forms without unnecessary spaces around.
Good luck !!
For further information, mail us at email@example.com