Monday, October 18, 2010

email router polling

Following the procedure below will change the polling period from every
1,000 seconds to every 30 seconds.

1. Go to the server where the e-mail router is installed.
2. Go to C:\Program Files\Microsoft CRM Email\Service
3. Edit the file Microsoft.Crm.EmailAgent.xml with Notepad
4. Find the element SchedulingPeriod
5. Change the value (most likely currently 1000) to 30
6. Restart the Microsoft CRM Email Router service

Tuesday, August 24, 2010

xRMLinq

Just started using XRMLinq to help simplify my code for a major import.  So far it's a pretty good tool, although their web site leaves a lot to be desired when it comes to documentation.  Luckily, they do respond to e-mail requests for support, usually with a 12 hour or so turnaround.

http://www.xrmlinq.com/

Wednesday, August 18, 2010

"This Path is not of a legal form" Installing Data Migration Manger on x64

Here is how you make the path legal to install Data Migration Manager.

  • Start > Run
  • Type "regedit.exe" (without quotes)
  • Navigate to key - [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\C5D06E9536719E94DB7D0491EB205E22\InstallProperties

Set value to:  C:\Program Files\Microsoft Dynamics CRM

It is blank by default on the CRM server.

Pulled from http://mscrmnovice.blogspot.com/2009/03/path-is-not-of-legal-form-error-while.html 

Friday, August 6, 2010

Not enough ports, timeout problem

http://blogs.msdn.com/b/dgorti/archive/2005/09/18/470766.aspx

Tuesday, August 3, 2010

Workflow fails sending multiple e-mails

I was having this problem with a workflow, and apparently Update Rollup 12 fixes it.  Woo hoo!

http://support.microsoft.com/kb/981053/

Wednesday, July 14, 2010

Dynamics CRM 2011

I got a notice that Dynamics 2011 has been announced at the Partner conference.  I read the press release, but it seems to be mostly focused on CRM online.  I hope that they are not abandoning the on-premise version.

Monday, June 28, 2010

Stupid Error

I don't know why this keeps coming up, but it does.  Whatever AD service account you are using has to be a member of the "privusergroup" for that instance of CRM.  My test box suddenly stopped working last week, and it took me most of the day today to figure it out.  Frustrating...

http://blogs.msdn.com/b/jonasd/archive/2008/01/11/caller-does-not-have-enough-privilege-to-set-callerorigintoken-to-the-specified-value.aspx

Thursday, May 20, 2010

Where to find values for Picklist Items

When I finally get to reporting, I will need this more, but I also need this for some other data import work I am doing.

Just discovered how to get the actual picklist int value when you know the name.  You have to look in the StringMap table and link it to the MetadataSchema.Entity table (which I still can't find in the SSMS object browser, but it must be somewhere) on the ObjectTypeCode in each one.


SELECT s.*, ' ', e.*
FROM StringMap s
INNER JOIN MetadataSchema.Entity e ON s.ObjectTypeCode = e.ObjectTypeCode


Found it on this blog:
http://extremecrm.net/2009/03/22/display-a-crm-40-picklist-display-value-in-report-or-query/

Tuesday, May 4, 2010

Speed up your CRM SDK imports and updates

I ran across this problem several weeks ago that an import of many thousands of records using the CRM SDK was taking forever, or timing out.  Luckily, there is a setting on the connection object that you can use to speed things up quite a bit.


CrmService crm = new CrmService();
crm.Credentials = System.Net.CredentialCache.DefaultCredentials;

crm.UnsafeAuthenticatedConnectionSharing = true;

This other blog post describes these setting in more detail.

http://billoncrmtech.blogspot.com/2008/10/blog-move-speed-racer-call-crm-at.html

This was also discussed at a CRM Optimization session at Convergence 2010 and the Microsoft Support people said that for bulk inserts/updates this is OK to use, just keep in mind the caveats of only authenticating once.  Probably fine for internal use on your network, but not for external internet connections, etc.

Sunday, May 2, 2010

Color Coding your records

I've done this color coding with injected DHTML, but this other blog talks about using an IFRAME to do it.  I may have to take a look at this because I don't like the way mine gets resized.  I'm actually using color coding to show if a case is NEW, OPEN, or CLOSED, but I also use color in a field that has account and contact alerts in it.

http://businessnone.com/demo-tools/getting-customer-temperature/

Maybe an IFRAME works better?

Thursday, April 29, 2010

How to use External Javascript in your form

Just got back from the Convergence 2010 conference, and learned a LOT of great information on customizing Dynamics CRM.  One of this things I found very suprising was that the consulting services people said that it was OK to use external javascript files in your forms to make development easier.  I always thought this was unsupported in CRM, so I was happy to hear this.  
NOTE: If you have Outlook client users that take CRM offline, this method will not work.  You will need to come up with a way to get the external files onto their PC.  I have no idea how to do this, sorry.


Clicking Settings/Customization/Customize Entites/Case/Forms and Views/Form/Form Properties/OnLoad/Edit then pasting in the new code I just edited in VS2008.  Click Ok/Ok/Save and Close/Actions/Publish.  That's a lot of steps. :)

So when I got back to the office, I set to work externalizing the HUGE javascript files I had already created.  I found several other blog posts on how to do this, and frankly am a little frustrated that there are apparently several methods to do this, some of which don't work that well.

The big problem is caching in the browser.  A good idea when you want the browser to be fast, but a bad idea and a big pain when you are developing and constantly editing code, saving, and testing.

So here is the final code that I pasted into the OnLoad for my case form.

function load_script(url) {

   var url2 = url + "?dummy=" + Math.random().toString().substring(2);
   var x = new ActiveXObject("Msxml2.XMLHTTP");
   x.open('GET', url2, false);
   x.send('');
   eval(x.responseText);
   var s = x.responseText.split(/\n/);
   var r = /^function\s*([a-z_]+)/i;
   for (var i = 0; i < s.length; i++) {
     var m = r.exec(s[i]);
     if (m != null) {
        window[m[1]] = eval(m[1]);
     }
  }
}

load_script("/ISV/_scripts/CaseForm.js");

I won't pretend to know exactly what this script is doing, I just compiled it from a bunch of other sites and blogs.  The twist that I added was the editing of the URL to add the random math string.  Again, not my idea, just mashed it up from posts on these three sites.

http://www.henrycordes.nl
https://community.dynamics.com/blogs/crmmattwittemann
http://social.microsoft.com/Forums/en-US/crmdevelopment

Also, want to give a shout out to Julie Yack for inspiring me to start a blog.  I attended a Social Media interactive discussion she was facilitating at Convergence 2010.  If you find this blog useful, check out her blog as well.

http://julieyack.blogs.com/

She worked on a fantastic book that I refer to frequently when working on my CRM project, CRM as Rapid Development Platform.