HOW TO: Resize MS CRM forms to fit screen size


Read this post if you want one wiondow or all to fit screan size.

If you need only one form to fit screan size you can add following code in the OnLoad event:
    window.moveTo(0, 0);
    window.resizeTo(screen.availWidth, screen.availHeight);
  

Three easy steps are needed to make all CRM 4.0 forms to fit screen size:
  1. Locate global.js file ([Path to Microsoft Dynamics CRM folder]\_static\_common\scripts\global.js) and open it

  2. Locate safeWindowShowModelessDialog function and change it as shown below:



  3. Locate safeWindowOpen function and change it as shown below:




Code needs to be inserted in safeWindowOpen and safeWindowShowModelessDialog:
    if(windowOpened!=null)
    {
    windowOpened.window.moveTo(0, 0);
    windowOpened.window.resizeTo(screen.availWidth, screen.availHeight);
    }