Darren Liu's Blog

Slow Internet Explorer 7 (IE7) Performance

leave a comment »

I am working on a global Dynamics CRM 2011 project and we are encountering performance issues on Internet Explorer (IE) 7.  I guess there are several options to tackle this problem.

  • Option 1: If you customer is ok with upgrading all of the users to IE 8 or 9, they will see performance enhancements for sure comparing to IE 7.  However not an ideal option since enterprise customers are not moving as fast as smaller companies on their infrastructure and on the users’ operating system.
  • Option 2: Update 2 IE settings and add a registry key to the user’s machine, I can’t believe what I am seeing.  CRM 2011 performs extremely well after the changes.  Here’s what I did.
    1. Change the Internet Explorer settings
      • Navigate to Tools | General | Tabs (Settings).
      • Unselect Enable Quick Tabs.
      • Select Let Internet Explorer decide how pop-ups should open.
      • Click OK and then restart the browser.
    2. Add the following registry key (by default, IE only has 2 connections)
      • Click Run  | Regedit.
      • Navigate to hkeycurrentuser\software\microsoft\windows\currentversion\internetsettings.
      • Add new DWORD MaxConnectionPerServer with Decimal value of 10.
      • Add new DWORD MaxConnectionsPer1_0Server with Decimal value of 10.
      • Close Regedit.

Thanks to my buddy, Jim Wang, for the great tips!

Written by darrenliu

02/22/2012 at 3:29 am

Chance to Get a free e-Copy of our CRM book!

with 2 comments

Do you want to read our book for free?  Our publisher is giving away two free e-copies of our book, Microsoft Dynamics CRM 2011 New Features,  if you tell us one or more of features that make you want to own this book in the comments section below (on this post).  Two of the individuals who have the best reason will get a free e-book. 

Please make sure you provide me your contact information so I can get in touch with you.

Thank you for your support!

MicrosoftDynamicsCRM2011NewFeatures

Darren Liu

Written by darrenliu

02/08/2012 at 1:41 am

Posted in Book, CRM

Tagged with ,

SATA to SSD!

leave a comment »

I upgraded my laptop’s hard drive from STAT to SSD this past weekend, now I have raised my minimum requirement for a laptop that it must has a SSD.  Swapping the hard drive was easy, however to clone the information from the old SATA to SSD was not so straight forward since I had BitLocker turned on.  I am going to write down what I did so I can remember how to do it next time.

  1. Turn BitLocker Off.
    • Navigate to Control Panel | System and Security | BitLocker Drive Encryption.
    • Click Turn Off BitLocker for the Hard Drive that has BitLocker On.
  2. Install the HD Clone Software.
  3. Follow the wizard to clone the hard drive.
  4. Turn BitLocker On.

Written by darrenliu

12/22/2011 at 5:25 pm

Posted in Misc

Tagged with

The CRM Book: Microsoft Dynamics CRM 2011 New Features

leave a comment »

Packt Publishing released the book Microsoft Dynamics CRM 2011 New Features.  This book covers CRM 2011’s new features by walking a person through building an Airline Compensation Management System in CRM.  Jim Wang and I spent many hours on the book past year and now it’s available on Amazon.com.  I hope you can learn something from our book.

MicrosoftDynamicsCRM2011NewFeatures

Written by darrenliu

11/07/2011 at 7:10 pm

Posted in Book, CRM

Tagged with ,

Lesson Learned: Import Failed and Publish Failed

leave a comment »

Our team encounter issues with import and publish because we have a single 6MB unmanaged solution.  A 6MB CRM solution is considering a very big solution.  Depends on the hardware, it took us more than an hour to import and then another hour to publish (Apparently we didn’t have hardware that are beefy enough for the job).  I just want to write down the things that we did to resolve the issues just in case I run into it again.  This is also for people who are running into the issues.

Break the solution into smaller solutions :  Since we have a 6MB unmanaged solution, we need to break it into smaller packages so the import and publish can be faster.  At this moment, we are breaking our solution into smaller unmanaged solutions.  So how should we break the big solution?   After learning from our colleagues and friends, we split our solution into 5 smaller solutions.  Here’s what we did:

  1. Customization
    • Data Model
    • Form and Views
    • Web Resources
    • Global Option Sets
    • Site Map
    • Application Ribbon
  2. Plugins
  3. Processes
  4. Reports and Dashboards
  5. Security Roles (Note: It’s recommended to split our security roles into its own solution because when importing security roles, a lot of calculations are happening in the background, so importing security roles with other components could slow down the import quite a bit)

We are going to package our solution into managed solution.  The recommendation we received is to break the solution into smaller managed solutions.  Because managed solution is smaller because it only contains the delta customizations.  The table below will shows the customizations included in the file when you package the solution.

Component

Export

Import Behavior

Entity

Delta

Delta

Attributes

Delta

Delta

Forms

Delta

Delta

Views

Full

Overwritten

Charts

Full

Overwritten

Web Resources

Full

Isolated

Reports

Full

Overwritten

Processes

Full

Overwritten

Global Option Sets

Delta

Delta

Security Roles

Full

Overwritten

Field Security Profile

Full

Overwritten

Site Map

Full

Overwritten

Application Ribbon

Delta

Delta

Change the timeout value: Out of the box CRM timeout values are too short for a big solution, it’ll timeout/hang.  Below are the things that you can do.  Thanks Alok from our team for the detail step by step instructions.

Registry Settings

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate the following registry subkey:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM

  3. Right-click MSCRM, point to New, and then click DWORD Value to create a new DWORD value.
  4. Rename the DWORD value to the following value:

    OLEDBTimeout

  5. Right-click the DWORD value, and then click Modify.
  6. In the Edit DWORD Value dialog box, type 86400 in the Value data box, click Decimal in the Base option, and then click OK.

    Note: According to the requirement of the computer that is running SQL server and the number of customization files, the value can be larger than 86400. The value of 86400 is equivalent to 24 hours.

  7. Right-click MSCRM, point to New, and then click DWORD Value to create a new DWORD value.
  8. Rename the DWORD value to the following value:

    ExtendedTimeout

  9. Right-click the DWORD value, and then click Modify.
  10. In the Edit DWORD Value dialog box, type 1000000 in the Value data box, and then click OK.

    Notes
    • In the Value data box, you can type a value that is larger than 1,000,000. However, do not type a value that is larger than 2,147,483,647. This is hexadecimal 0x7FFFFFFF.
    • If this key already exists, notice the current value. After you have completed the import or the upgrade for Microsoft Dynamics CRM, set the value of this key back to the original value or delete the key if it did not previously exist. The default OLEDB timeout value is 30 seconds.

Web.Config File

  1. Navigate to the CRMWeb directory. Usually this directory is located in [Drive]:\Program Files\Microsoft Dynamics CRM\CRMWeb
  2. Right-click the Web.config file, click Open With, and then click Notepad.
  3. In Notepad, locate the following line.

    <httpRuntime maxRequestLength="8192"/>

  4. Change change maxRequestLength="20000".
  5. Save and then close the Web.config file.

MSCRM_CONFIG Settings

  1. Execute the following on the MSCRM_CONFIG DB on the MSCRM SQL Server.
USE MSCRM_CONFIG

GO

UPDATE DeploymentProperties SET IntColumn=9000 WHERE ColumnName='SqlCommandTimeout'

Do an IIS Reset after you complete all of the steps above.

I hope this helps you in your CRM project. Smile

Written by darrenliu

10/27/2011 at 9:25 pm

New CRM SDK and White Paper Released!

with 2 comments

The CRM SDK team released version 5.0.7 of the SDK and this version includes a lot of new things that incides with UR 5 and the CRM Online November Service Release.  You may download the new SDK from MSDN library and also on MSDN download.

Also the CRM Engineering for Enterprise Team and the CRM Content Publishing Team release a white paper today on Deploying Microsoft Dynamics CRM 2011 and CRM Online Solutions from Development through Test and Production Environment, which is available for download from the Microsoft Download Center

This white paper explores deploying real-world Microsoft Dynamics CRM solutions across test and production environments in reliable and repeatable ways by using automation. The paper also provides some automation example and highlights the specific constraints associated with deploying and testing solutions in a Microsoft Dynamics CRM Online environment. 

Thanks to the CRM team for the opportunity to contribute to this white paper.  Couple of my colleagues and myself contributed to this paper as well!

Written by darrenliu

10/26/2011 at 9:50 pm

Posted in CRM, SDK

Tagged with , ,

CRM 2011 SDK 5.0.6

leave a comment »

The product team has updated the CRM 2011 SDK to version 5.0.6.  Based on the release note, the following has been updated.  To get the latest SDK, you may download in MSDN Downloads or view it at MSDN Library.

Release

New and updated topics

Description of changes

Version 5.0.6, August 2011

Microsoft_Dynamics_CRM_2011_SDK_Readme.htm

Updated the readme with new information.

 

Tools\PluginRegistration

Added support for Windows Azure AppFabric Access Control Services (ACS) 2.0.

 

SampleCode\CS\CrmSvcUtilExtensions\GeneratePicklistEnums\
CodeCustomizationService.cs

SampleCode\VB\HelperCode\OptionSets.vb

SampleCode\VB\QuickStart\CRUDOperations.vb

Fixed a bug in the code generation that caused the Microsoft Visual Basic .NET output file not to compile.

Added a Microsoft Visual Basic .NET helper file containing enumerations for option sets, status, and state codes. Modified the Microsoft Visual Basic .NET version of the Quick Start sample to demonstrate the use of these enumerations.

 

Analyze Plug-in Performance

Added documentation for the Plug-in Profiler tool.

 

Azure Extensions for Microsoft Dynamics CRM

Configure AppFabric ACS for Microsoft Dynamics CRM Integration

Minor updates to most sub-topics under this topic. Updated the AppFabric SDK links and added information on how to use Windows Azure AppFabric ACS 2.0.

 

Dependency Tracking for Solution Components

Global Option Set Values

Sample: Detect Solution Dependencies

Sample: Work with Global Option Sets

Sample: Work With Solutions

SDK\SampleCode\CS\HelperCode\CrmServiceHelpers.cs

SDK\SampleCode\VB\HelperCode\CrmServiceHelpers.vb

Modified all solutions samples to remove references to the SolutionComponentType class that was removed from the CrmServiceHelpers.cs and CrmServiceHelpers.vb helper code classes.

All solutions topics and samples now refer to the componenttype enumeration found in the enumeration helper code generated for all global option sets, picklists, state and status values. These enumerations can be used in your code by adding the file SampleCode\CS\HelperCode\OptionSets.cs or SampleCode\VB\HelperCode\OptionSets.vb to your project.

The list of topics and samples shown here represents the primary locations for these samples, but usage of the componenttype enumeration can be found throughout the documentation.

 

Maintain Managed Solutions

Updated the information in the Require a Minimum Version section.

You must edit the solution.xml file from a managed solution to require a minimum version. Previous content incorrectly said that you must edit the solution.xml file for an unmanaged solution.

 

Modify Icons for an Entity

Added guidance recommending the use of PNG web resources for icons.

 

Sample: Create a Connection (Early Bound)

SampleCode\CS\BusinessDataModel\BusinessManagement\CreateConnection.cs

SampleCode\VB\BusinessDataModel\BusinessManagement\CreateConnection.vb

Updated the sample to include the code that associates a role to itself using the Associate method, as required when the same role is assigned to both records in the connection.

 

Sample: Distribute a Quick Campaign

SampleCode\CS\BusinessDataModel\Marketing\QuickCampaign.cs

SampleCode\VB\BusinessDataModel\Marketing\QuickCampaign.vb

Fixed the sample so the activities are generated and the activity status changes correctly, by setting the PostWorkflowEvent property in the PropagateByExpressionRequest and CreateActivitiesListRequest message requests.

 

Use the REST Endpoint with Ajax and JScript Web Resources

Write Code for Microsoft Dynamics CRM Forms

Added comment to clarify about the supported use of jQuery.

 

Setting a Date as Criteria in a Filter in a Query

Fixed the sample getODataUTCDateFilter function so that it sets the month value correctly.

 

Xrm.Page.ui control methods

Added guidance for improving performance using the setVisible method.

Written by darrenliu

08/29/2011 at 9:01 pm

Posted in CRM, SDK

Tagged with ,

Update Rollup 3 for CRM 2011 is available now!

leave a comment »

Rollup #3 has been released and it fixes dozens of bugs in CRM 2011.  You may download UR3 at http://www.microsoft.com/download/en/details.aspx?id=26912.  Here are some of the things UR3 fixed:

  • You import a solution that contains a plug-in that has empty methods. You publish the customizations. When the plug-in is triggered in this situation, you receive the following error message:

    Unexpected Error
    An error has occurred.

    .

  • The search results for system views in the Dynamics CRM 2011 client for Outlook are not compliant with the search results in the Microsoft Dynamics CRM web client.
  • Assume that you enable the http compression setting on the Dynamics CRM server. In this situation, the Microsoft Dynamics CRM 2011 Outlook client does not receive responses for SDK calls as compressed. This problem occurs because the Outlook client does not send an "EnableDecrompression" http header with the request.
  • The Dynamics CRM 2011 client for Outlook initiates background send requests to the CRM server. This behavior can cause high server load and decreased performance because these requests are not throttled. This fix throttles these background send requests.
  • Consider the following scenario:
    • You create a custom entity that has a custom icon.
    • You create at least two records that begin with the letter "A."
    • You create a "1 to many" relationship from the custom entity to another entity.
    • You expose the Lookup field for the relationship to the custom entity in the related entity.
    • You log on to a Microsoft Dynamics CRM 2011 Outlook client that connects to the environment through IFD/Claims.
    • You clear the Microsoft Internet Explorer cache.
    • You create a new record for the related entity.
    • You run the auto-resolving lookup function by using the letter "A" for the custom entity.

    In this situation, you receive a warning message that states there are multiple matching records. Additionally, the icon does not appear.

  • The Help files are updated.
  • Assume that you configure the Dynamics 2011 client for Outlook. You browse to the Account folder or the Contact folder. In this situation, you experience slow performance when ribbons and menus are rendered.
  • The Start Date field in the Fiscal Year Settings dialog box does not display the date that is converted according to the user time zone settings.
  • The value for the Set this computer to be the synchronizing client in the Dynamics CRM 2011 client for Outlook is different if you open the personal settings dialog box by clicking the Options button in the Track In CRM pane in an email message or an appointment. Additionally, if you select the Set this computer to be the synchronizing client check box, the dialog box becomes unresponsive.
  • Some duplicate attribute labels exist. Therefore, it is difficult to map data on imports.
  • The Russian translations of the Create column heading and the Delete column heading are incorrect in the security role permissions.
  • When you send a Direct Email message to a large dataset, duplicate email messages are generated.
  • When you add a user in a multi-site domain, you experience slow performance after you click Save.
  • Assume that you enable auditing for the Contact entity. If you use a Microsoft Dynamics CRM 2011 Client for Outlook, an auditing log is displayed every 15 minutes or every time that the Outlook client is synchronized with Microsoft Dynamics CRM 2011.
  • Some translations for the Slovenian language are incorrect.
  • Assume that you specify a comma as the decimal separator in the personal format settings. When you enter a decimal custom value in a Duration field, the value is rounded unexpectedly.
  • When you export a static Microsoft Excel worksheet with non-English operating system settings, the Currency values are multiplied by 10,000.
  • When you export a Duration field to an Excel worksheet, the value in the Duration field is displayed as text instead of as a number.
  • If an organization starts many asynchronous operations, the Asynchronous Service allocates many resources to process those requests from the organization. In this situation, other organizations will have an increasing backlog of asynchronous operations. This fix introduces a new deployment setting, called AsyncSelectMaxItems, in the DeploymentProperties table. This setting limits the number of items that can be processed by a single organization at one time. By default, the value is not set. It can be set manually if you experience this issue.
  • Metadata cache access for one organization is blocked if another organization is loading metadata.
  • Assume that you create a contact who has a 200-character email message in Microsoft Dynamics CRM 4.0. When you upgrade the system to Microsoft Dynamics CRM 2011, you receive an upgrade error.
    When you create a contact who has a 200-character email message in Microsoft Dynamics CRM 2011, an internal server error occurs.
  • When you add a URL that contains a query string parameter to a sitemap area or to a subarea in Microsoft Dynamics CRM 2011, the URL is rendered incorrectly.
  • Some Swedish language translations are incorrect.
  • Assume that you have a contact who has the Business Phone filed populated. When you add a new phone call activity by using the ribbon from the Activities area, the Phone Number field is not populated in the phone call activity.
  • When you import a solution, some entities are not imported. Additionally, you receive the following error message:

    Cannot change the max length of the owneridname attribute.

  • When you view the file properties of some files by clicking the Details tab, the value in the Company name field and the value in the Product name field are blank.

Written by darrenliu

07/28/2011 at 9:50 pm

Posted in CRM, Update

Tagged with , ,

CRM 2011–Cannot publish customizations after import

with one comment

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.

Written by darrenliu

07/08/2011 at 2:36 pm

Posted in CRM, Customization

Tagged with , , ,

Microsoft Dynamics Sure Step Methodology

leave a comment »

Microsoft Dynamics Sure Step Methodology R2 has been released on April 22, 2011.  Besides all of the new contents added, I want to point out that the Sure Step methodology has been translated into 9 other languages.  It has

  • English
  • Chinese (Simplified)
  • Danish
  • French
  • German
  • Japanese
  • Portuguese
  • Russian
  • Spanish
  • Turkish

image

Written by darrenliu

05/10/2011 at 8:38 pm

Posted in CRM, SureStep

Tagged with ,

Follow

Get every new post delivered to your Inbox.