Monday, December 8, 2008

CRM Client for Outlook Performance tweaks

One of the most common complaints I get from clients that use the CRM for Outlook add-in is that "It takes forever to open" or "It makes my outlook run slow!". Many of the performance problems that are actually related to the CRM add-in were fixed individually with a hotfix or more recently fixed in rollup 1 which was released late last month. (And can be downloaded here)

Most of the speed problems are Outlook issues and can be resolved a number of different ways. Before I begin, let me explain the difference between a .pst and an .ost. If you are using outlook to download e-mail from your e-mail provider via pop3, IMAP or some other service, you are most likely storing your e-mail in a .pst (personal store). If you connect to an exchange server to get your mail, you most likely running in cached exchange mode and have an .ost. The .ost is just a cached version of what is stored for you on the exchange server but is located on your hard drive similar to a .pst. Now that that is out of the way, lets move on to the actual tweaks.

1) The enhancement that I find gives me the most bang for the buck (this is for Outlook 2007 users) is to rename the extend.dat file under the individual user's profile. On XP this is located in c:\documents and settings\\Local Settings\Application Data\Microsoft\Outlook and in a similar location on Vista under the c:\users directory. Renaming another file, FRMCACHE.DAT located here: C:\Documents and Settings\\Local Settings\Application Data\Microsoft\FORMS has also been known to improve outlook startup and response times.

2) The way I understand it, Outlook loads its data store into memory at startup. If you have a lot of e-mail, this can decrease the performance of Outlook significantly. Archiving e-mail into a separate .pst file or deleting old e-mail can help performance.

3) Prior to outlook 2003, .pst's and ost's could not exceed 2GB's. In 2003 and later this issue was fixed but for many users, outlook performance decreases significantly when the .pst and .ost sizes reach the 2GB and greater mark. If your .ost file is larger than 2GB, try archiving old e-mail into a local store (.pst). OST's do not shrink in size once data has been removed so if you recently deleted a large quantity of mail and noticed that your .ost hasn't shrunk in size, you can fix this by renaming the .ost file (with outlook closed). When outlook opens again it will connect to the exchange server and re-create the .ost file using a more appropriate size.

Friday, December 5, 2008

Crm 4.0 Rollup 1 and CRM's Auto-Update Feature

With the first roll-up now available for CRM 4.0, I'm sure there are administrator's out there dreading deploying the client patch on each and every afflicted computer. I just wanted to take a moment to uncover a post from the Microsoft Team blog that could save you a lot of trouble in the future: https://community.dynamics.com/blogs/cscrmblog/archive/2008/05/08/crm-client-autoupdate.aspx

Essentially it outlines how to set up the auto-update functionality in the outlook client from the server. It does mention that you need to add a key to the registry of each computer that has CRM but remember you can easily deploy the key via netlogon scripts deployed using active directory.

Monday, October 27, 2008

Dymo label printing straight from CRM

Now most CRM's have the ability to print batched labels in one form or another and most CRM's also have the ability to print an envelope but many lack easy integration with one of the most common office automation tools available: The label printer.

Fortunately, DYMO has made it easy for us since they provide easy access to their SDK which has a number of well documented examples on how to implement DYMO label printing directly from your own application (or in this case Javascript).

For this basic example, were going to encapsulate our code inside of a button located on a the contact form.

The Button code that goes inside of the contact section in ISV Config customizations:

<Button Icon="/_imgs/ico/print_ico.gif" JavaScript="<JSCRIPT CODE GOES HERE>" Client="Web, Outlook" AvailableOffline="false">
<Titles>
<Title LCID="1033" Text="Print Label" />
</Titles>
<ToolTips>
<ToolTip LCID="1033" Text="Prints Dymo" />
</ToolTips>
</Button>


The Javascript to print the label:

// Initializes the basic required variables
var texttocopy = '';
var DymoAddIn, DymoLabel;

// The following commented line prompts the user to add additional information to a label. This is useful if you design a custom label that requires the user to insert a special code
// var taginfo = prompt('Type of Label?', '');

// Set up the DymoAddIn object. This is the master object that actually prints the label
DymoAddIn = new ActiveXObject('DYMO.DymoAddIn');
// Label object where the label information is actually stored and passed to the dymo activex control
DymoLabel = new ActiveXObject('DYMO.DymoLabels');

// Set the taginfo field to blank if it's null. Used if you are using a special code for a label
// if(taginfo == null) { taginfo = ''; }

try
{
// Add Company variable to texttocopy field if it exists and give it a newline
if (crmForm.all.companyname.DataValue != null)
{
texttocopy += crmForm.all.companyname.DataValue + '\n';
}

// Add Firstname variable to texttocopy...
if (crmForm.all.firstname.DataValue != null)
{
texttocopy += crmForm.all.firstname.DataValue + ' ';
}
// Add Lastname variable to texttocopy...
if (crmForm.all.lastname.DataValue != null)
{
texttocopy += crmForm.all.lastname.DataValue + '\n';
}
// If no Lastname then just a carraige return
else
{
texttocopy += '\n';
}

// Lets check the various required address fields to make sure they exist
if (crmForm.all.address1_line1.DataValue != null && crmForm.all.address1_city.DataValue != null && crmForm.all.address1_stateorprovince.DataValue != null && crmForm.all.address1_postalcode.DataValue != null)
{
texttocopy += crmForm.all.address1_line1.DataValue + '\n';
// Address 2 isn't always used to lets make sure it exists
if (crmForm.all.address1_line2.DataValue != null)
{
texttocopy += crmForm.all.address1_line2.DataValue + '\n';
}
// Add in the rest of the addresses
texttocopy += crmForm.all.address1_city.DataValue + ', ' + crmForm.all.address1_stateorprovince.DataValue + ' ' + crmForm.all.address1_postalcode.DataValue + '\n';
}

// The dymo label software installs the label files into one of several locations. Use the label that corresponds to the type of label you are printing.
if(DymoAddIn.Open('C:\\Documents and Settings\\All Users\\Documents\\DYMO Label\\Label Files\\LABEL.LWL'))
{
// Set the address to actual DymoLabel Object
DymoLabel.SetAddress(1, texttocopy);
// Insert custom text into a label
// DymoLabel.SetField('INFOFIELD', taginfo);
// Print the label
DymoAddIn.Print(1, true);
}
// Default location of label file for older installations
else if (DymoAddIn.Open('C:\\Program Files\\DYMO Label\\Label Files\\LABEL.LWL'))
{
DymoLabel.SetAddress(1, texttocopy);
// Insert custom text into a label
// DymoLabel.SetField('INFOFIELD', taginfo);
DymoAddIn.Print(1, true);
}
// Vista
else if (DymoAddIn.Open('C:\\Users\\Public\\Documents\\DYMO Label\\Label Files\\LABEL.LWL'))
{
DymoLabel.SetAddress(1, texttocopy);
// Insert custom text into a label
// DymoLabel.SetField('INFOFIELD', taginfo);
DymoAddIn.Print(1, true);
}
else
{
alert('Error: Label file Not Found!');
}
}
catch(e)
{
alert(e + ': ' + e.description);
}

For this to work, the dymo label software needs to be installed on any workstation that needs to use this customizations with a dymo printer properly configured.

Thursday, October 23, 2008

Dynamics CRM on Linux (Possibly Mac)

We were recently contacted by a client with a pretty difficult requirement: They had to be able to use CRM on Linux desktops. We have been searching for a solution that addresses accessing CRM via a mac for a while now but haven't had much of a call for using it on Linux workstations. There are a few solutions we've seen that relate to using VMware (such as in Matt Whittemann's post here) or running it in a virtual environment such as parallels.

While researching this problem I happened to stumble across IEs4Linux. It's an installer that grabs the proper windows cabs, installs and then configures IE6(or 4/5) in a bottled wine instance. After some testing we concluded that it would provide a fairly stable environment for CRM on Linux. The screenshots below show CRM running in IE6 on a gnome desktop.

Performance was ok on an aging Celeron with 512mb's of memory. I would recommend something a little beefier for better performance. Keep in mind that this doesn't include the Microsoft Outlook client addin so still no way to integrate mail other than using the e-mail router and exchange rules to dump it in directly.