-
Preventing Timeouts with Dynamics CRM 3.0
The main SQL Server ( 2000 ) at my current customer becomes overloaded at times due to month-end processing requirements, etc.
This can be really irritating when you're trying to create new CRM Entities, which is one of the most intensive database tasks you can do to CRM.
The errors you will see when the operation times out will vary, but usually result in a Timeout message, or one of the famous, "An error has occurred. Contact your system administrator."
Enabling CRM Tracing has shown that we're getting timeouts to the database or by the .NET process aborting its thread. Either way, an error will be produced.
I researched the situation about two weeks ago and came across a really fine article from Simon Hutson on what, at first glance, seems to be a totally unrelated topic. However, it is very much related and after running the changes on my test box for a while, I detemined it was safe to install them in production.
The changes did indeed prevent errors from occurring, but if there was a delay, you will be setting at the little yellow "saving" status box for quite a while. Maybe several minutes. But, I think a delay is better than seeing an error message.
Note: I'm going to make a very broad assumption that I don't need to tell you to use caution when making registry changes, make backups, etc.
Step1:
There are three changes that need to be made to the registry. I've attached a ZIP file to this article that has the .REG files ready to use.
Step 2:
Open the web.config file for your CRM web site and increase the executionTimeout to a larger amount. I chose 900 seconds:
httpRuntime executionTimeout="900"Step 3:
Reboot the CRM server.
References:
Microsoft CRM 3.0 setup error and TCP/IP ephemeral ports
Download: Reg Files
Dynamics CRM 3,158 views -
Displaying Contact Information inside an iFrame (updated 3/31/07)
My current project developed a requirement to display the Contact information on a tab on the Opportunity Entity. Pretty simple, I thought, just create a new tab, throw on an iFrame and put a reference to one of the CRM pages that will display the contact for me.
Pretty simple, on paper. Execution turned it into something quite different that took me much longer that I would have hoped. Anyway, here is the solution:
1. Create a new tab and insert an iFrame.
2. Set the URL field to:
http://server/_forms/readonly/readonly.aspx?obTypeCode=1&id=Which will make the form look like this:
3. In the Form's OnLoad Event, place the following code:
if (crmForm.all.customerid.DataValue[0].id != null)
{
var ContactURL = "http://crm/_forms/readonly/readonly.aspx?objTypeCode=2&id="
crmForm.all.IFRAME_ContactInfo.src = ContactURL + crmForm.all.customerid.DataValue[0].id;
}
This code will add the GUID or Unique ID to the URL for your iFrame so that when you click on the Contact Info tab, you see the contact information for the Contact associated with the Opportunity.

It took me longer than usual because the information in the SDK was incorrect. Thanks to Matt Whittemann for instructions to get around that issue and to Ronald Lemmen for information on how to display the read-only form.
Revision: 3/31/2007:
When you define the iFrame properties, you need to uncheck the Restrict cross-frame scripting in order for this to work properly.
References:
Dynamics CRM 3.0 SDK: Client Programming, iFrame Support
Dynamics CRM 3.0 SDK: Client Programming, URL Addressable Forms
Dynamics CRM 3.0 SDK: Client Programming, Lookup Field Types
New Example of Javascript OnChange Code For CRM 3.0
Customization, Dynamics CRM 3,145 views -
Only in America
I was on the road last week and when I returned, I realized that my MasterCard payment was due on Monday. I had recently added a new back to the automatic transfer system and for some reason, it take 5-7 business days to get that link working.
So, I decided to just call them and may a payment by check over the phone, from my new bank account.
"No problem," they said. "There will be a transaction fee of $14.95."
I laughed, thought a few evil thoughts about CitiGroup and went ahead with it.
So let me repeat back to you what I heard from the customer service rep:
"We are going to charge you $15 to take your money, because either A) you're costing us money by calling our 800 number; or B) we don't actually like you."
Did I mentioned that it cost me $15 extra to pay them money that I owed them?
Meanderings 770 views



