Saturday, March 21, 2009

"The path is not of a legal form" Error - While installing Data Migration Manager

While installing Data Migration Manager for Microsoft Dynamics CRM 4.0 on the Server, I received the error message "The path is not of a legal form"

the path is not of a legal form
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\59DD8CB00184F24E99A62CF4D6109FA\InstallProperties]
  • Right-click InstallLocation and select Modify
  • In the Value Data text field type "C:\Program Files\Microsoft Dynamics CRM"
The Value Data field had no value, until I did the above needful. Now your installation must be smooth. You can also follow this thread on Microsoft Forums for further information.
Happy Installing..

Please Note: The value 59DD8C...... after the \Products\ folder in regedit.exe might differ in some cases. I have learnt this as it has come up on forums. You might have values like:
  • 43689CC1EAEE14C458FDAD0580BC0C97
  • 059DD8CB00184F24E99A62CF4D6109FA
Go ahead with them. After all you want a successful installation, don't you?

Thursday, March 12, 2009

SDK v4.0.8 Announced

I am downloading the SDK from here while I'm writing this.

Using window.opener to refer to Parent CRM window's field

There are many ways you could go to the parent CRM window, but this is what I prefer. At first, I followed the SDK example, but then I invented my own. You could follow the SDK if you will?

Even though it is a little JavaScript but the challenge here is to know if the parent window is the one YOU are looking for?

So here is a little chunk of code that confirms you the Parent Window.

if(window.opener) //checks if current window has a parent window
{
   var oParentForm = window.opener.parent.document.getElementById('crmForm');
   if(oParentForm) //This confirms if the parent window is a CRM form
   {
      // Now try to access a field in the parent form
      // like name attribute in Account entity
      if(oParentForm.all.name) //This ensures you have reached the form you're looking for
      {
         // Proceed with your code
      }
   }
}
There could be other methods too, like checking the Object Type Code of the parent form instead of the 'name' field.

More ideas are welcome, don't hesitate, but share.