Darren Liu's Blog

Archive for the ‘Customization’ Category

CRM 2011–Cannot publish customizations after import

with 2 comments

Problem:

If you ever run into a situation that you imported your solution successfully and not able to publish it, the reason is because either the size of the solution might be too large or the SQL is not fast enough. 

We ran into this problem earlier this week.  We have a slow SQL server and the size of our solution is big, we can’t publish it and we don’t know what was the reason behind it since CRM didn’t provide any helpful error messages.

Cause:

After hours of troubleshooting, we finally figured out that CRM has a default timeout value of 300 seconds = 5 minutes. If any process takes more than 5 minutes, it’ll stop. 

Solution:

Modify the parameters in two different Web.config files:

File 1:

  1. On the CRM application server, open Internet Information Services (IIS) Manager.
  2. Expand the server name, and then expand Web Sites.
  3. Right-click the Microsoft CRM Web site, and then click Open.
  4. Right-click the Web.config file, click Open With, and then click Notepad.
  5. In Notepad, locate the following line.

    <httpRuntime executionTimeout="300" maxRequestLength="8192"/>

    Change to

    <httpRuntime executionTimeout="3600" maxRequestLength="20000"/>

  6. Save and then close the Web.config file.

File 2:

  1. Browse to the folder in which you opened the Web.config file, expand the MSCRMServices folder.
  2. Open the Web.config file with Notepad.
  3. Locate the following line.

    <httpRuntime maxRequestLength="8192"/>

    Change to:

    <httpRuntime maxRequestLength="20000"/>

  4. Save and then close the Web.config file.

I hope this will save you hours if you run into a similar situation.

Advertisements

Written by darrenliu

07/08/2011 at 2:36 pm

Posted in CRM, Customization

Tagged with , , ,

Reference an image in Web Resource from Site Map or Ribbon

with one comment

CRM 2011 has this excellent solution concept which I like it a lot!  If you can master on how to leverage solutions in CRM 2011, it’s quite powerful when you are doing customizations in CRM.  When doing Site Map or Ribbon customization, I often need to reference to an image. 

In the previous versions of CRM, I have to place the images into the ISV or the IMG folder under the CRM web site, and then reference to that image path.  CRM 2011 has totally changed, it’s trying to stay away from the ISV folder and everything now has to store in the Web Resource. 

So what is Web Resource?  You may just think of Web Resource as a folder within CRM that you can upload files to, it stores HTML pages, Silverlight Controls, Images, XML files and etc… If you would like to use them in CRM form, you can just insert them on to the form.  If you like to use them in Site Map or Ribbon, all you need to do is to use the $webresource: directive to specify a Web resource image to use as an icon in the ribbon or in the application navigation using Site Map. The following sample shows how to specify icons for a button in the ribbon.

<Button Id="MyISV.opportunity.form.actions.FlyoutAnchor.Button.1"
Image16by16="$webresource:new_/imgs/icon16.png"
Image32by32="$webresource:new_/imgs/icon32.png"
/>

So if you want to reference an image in Web Resource from Site Map, follow the steps below:
 
  1. Upload the image to Web Resource.
  2. Export Site Map.
  3. Update Site Map and use $webresource: directive to specify a Web Resource image.
  4. Import Site Map.
  5. Publish All Customization.

Written by darrenliu

02/07/2011 at 6:47 am

Posted in CRM, Customization, Development

Tagged with