Tuesday, September 30, 2008

Error in importing customizations when absolute path is long

This is one strange error I have encountered, when you browse a customization file to import to dynamics CRM, it obviously gives an error when the total path is more than 100 characters long, (i.e.

but, even when the path is close to 100 characters, Import may fail without any visible reasons, in that case, if you copy the file directly under drive, say C:/customizations.zip, it gets imported successfully.

Wednesday, September 10, 2008

Disable/Enable all fields on CRM entity form

While disabling fields from 1st method, some lookups, radio buttons and date fields may not get disabled, you have to disable them separately

// This loops through all elements of CRMForm, faster and consumes less memory

function disableFields(disableenable)
var CRMObjects = new Array(CF.,CF.,CF.,CF.);
for (i=0;i < CRMObjects.length;i++)

/*now disable all active form elements*/
for (i=0; i<>0)


Another way................. this takes more memory as it takes all elements of the HTML of CRM form


var iLen = crmForm.all.length;
for (i = 0; i < iLen; i++)
{ o = crmForm.all[i];
switch (o.tagName.toLowerCase())
{ case "input":
case "select":
case "textarea":
case "img":
case "iframe":
case “div”:
o.Disabled= true;