Showing posts with label MS CRM 4. Show all posts
Showing posts with label MS CRM 4. Show all posts

Microsoft Dynamics CRM Code Standards

Me and my friend Grigory Syomin created code standards we stick to.

We are glad to share document we did and hope that this document will be usefull to you as start point for your own standards. Here are links to doc and pdf.

Addressable form for displaying activities' views

There are two different forms to display views in MS CRM 4. One for activities' views and the other one to dispaly other entities' views.

I used to use following code to generate url for addressable form to display particular view:


Recently I found that homepage.aspx incorectly displays activities' views. Columns From and To were empty:


The right way is to use home_activities.aspx if you want to display activities' views. The code was changed to:


home_activities.aspx displays activities as shown here:


You can read more about addressable forms here: http://msdn.microsoft.com/en-us/library/cc150850.aspx

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);
    }