Blog, Development

How to make 9.0 Classic Client a bit cleaner

At the moment I do migration for one of customers from 8.2 ground to 9.0 cloud. I migrated all the customizations and customer was not satisfied with layout of updated classic 9.0 client. The biggest complain was related to huge whitespaces around fields. Just compare the same default forms of account entity 8.2 on the left and 9.0 classic UI on the right:

Obviously there was no supported way to change the layout so I had to use unsupported DOM manipulations (yes, I know it’s bad, but sometimes you have no alternatives). I added following code to onload handler of form:

function reformatForm() {
    try {
        parent.$(".ms-crm-ReadField-Normal").css("padding-top", "0px");
        parent.$(".ms-crm-Field-Data-Print").css("padding-top", "0px");
        parent.$(".ms-crm-Field-Data-Print").css("padding-bottom", "0px");
    } catch (e) {

    }
}

Here is comparison of forms without and with added handler:

 

11 Comments

  1. Hello. Using such code, is it also possible to force the size of the font. Standard in OnPrem is if i’m not wrong 11px, converted would be like a Segoe UI 8pt, but now in online it is closed to 9 or 10 pt? Cand be forced somehow label and value to 8? Many many thanks for your valuable input!

  2. This works perfectly fine. Any idea on how to implement this on sub grid in a form and views in 9.0. Awaiting your response.

  3. Any idea on how to reduce the space between rows in a sub grid and grid in views in 9.0

    1. Mark, you are welcome! But it’s time to move to the UCI because classic client will disappear in a year.
      Andrew

    1. Jatinder, I have never tried it with UCI because it doesn’t have that kind of an issue with wide whitespace.
      Thanks,
      Andrew

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.