Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Reduce Dynamics 365 v9 Field Spacing
if(!window.parent.document.querySelector('style#v9removepadding')) {
var style = window.parent.document.createElement('style'); = "v9removepadding";
style.innerText = ".acwallEmailView .emailexpandedaccordion { margin:0; width:100% } td { padding: 4px 1px 1px 16px !important; min-height: 26px; }";
Copy link

alirobe commented Mar 7, 2018

how to apply: (CRM admin only)

  1. Add as a settings -> customization - > web resource. (It's a JScript.)
  2. Publish the resource
  3. Add the webresource to entity -> form -> properties -> form libraries, for forms where you want to reduce padding...
  4. Publish the forms

note; this won't be supported by myself or microsoft - remember to leave a link to this gist in the description of the web resource, then add the webresource to forms where you want to apply this style...

Important known bugs:

  • the way this works currently, once it is applied on any form, it will continue to apply on all subsequent forms loaded in the same browser session. PR to fix this is welcome (potentially hook to url#target change?)
  • lookups still cause weirdness

Copy link

hshill1ng commented Jan 10, 2019

Awesome, Alirobe!!! You rock!

Copy link

alirobe commented Feb 25, 2020

Thanks for the feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment