Visit the product page here.
Here’s an overview:
I now think it is most important to convert as much of the code as possible and produce as few conversion alerts as possible.
Here are a few changes that I’ve made to the conversion of known issues:
Toolbar and Menu Manipulation
It was quite common in CRM 4.0 to hide and show toolbar buttons and menus programmatically. Since we’ve moved to the Ribbon in CRM 2011, this is no longer possible. In cases where such code is located, it will be commented-out to prevent runtime errors when the code is executed.
This may seem like a rather drastic step, but you would have had to perform the same action manually when refactoring your code so I decided to handle that process during the conversion. Here is an example:
document.all["_MBcrmFormSave"].action = "crmForm.SaveAndClose();";
// **Transformer!** Xrm.Page.getAttribute(
/* CONVERSION ALERT */"_MBcrmFormSave").action = "crmForm.SaveAndClose();";
Any time you see "**Transformer!** in a comment, it is the result of an action that was taken during the conversion process. This text was inserted so that you may more easily locate these instances. In certain cases, the insertion of the comment could break existing logic so you will need to manually correct the issue yourself.
Partial Field Names
The fields on a CRM form are made up of two parts: The label and the data-entry control. These are named using the field name, with a "_c" added for the label and "_d" added for the control. I call these partial field names because the two parts make up the whole field.
Any time partial fields are encountered using any of the following methods, the "_c" and "_d" are removed:
- Any method call where only the field is referenced, such as:
The normal conversion happens, as it would for any other CRM 4.0 method. The side-effect to this process is duplicate code, for example: If we start with this:
crmForm.all.new_writeinproductname_c.style.display = 'inline'; crmForm.all.new_writeinproductname_d.style.display = 'inline';
we end up with:
Here is an example of some CRM 4.0 code pre-conversion:
crmForm.all.new_writeinproductname_c.style.display = 'inline'; crmForm.all.new_writeinproductname_d.style.display = 'inline'; crmForm.all.priceperunit.ReadOnly = false; crmForm.all.priceperunit.Disabled = false; crmForm.all.new_newproductid_c.style.display = 'none'; crmForm.all.new_newproductid_d.style.display = 'none'; crmForm.all.new_productcode_c.style.display = 'none'; crmForm.all.new_productcode_d.style.display = 'none'; crmForm.all.productdescription.ReadOnly = false; crmForm.all.productdescription.Disabled = false;
and this is what it looks like post-conversion:
Xrm.Page.getControl("new_writeinproductname").setVisible(true); Xrm.Page.getControl("priceperunit").setDisabled(false); Xrm.Page.getControl("new_newproductid").setVisible(false); Xrm.Page.getControl("new_productcode").setVisible(false); Xrm.Page.getControl("productdescription").setDisabled(false);
This can greatly reduce the amount of code controlling your user experience manipulation but it does have the unintended consequence of preventing an accurate comparison of the CRM 4.0 and CRM 2011 code when you are reviewing the conversion results using Transformer!’s Synchronize Scrolling feature.
There are certain cases where it is necessary to customize the CRM user interface to perform a specific action or to inform the user of a specific condition or alert, or whatever. This was mainly accomplished by changing the .style property of a field.
Such actions were totally unsupported in CRM 4.0 and remain so in CRM 2011. Here is an example:
crmForm.all.new_status.style.textColor = "#000000";
The problem is that some organizations would like these features even though they know they run the risk of incompatibility with a future upgrade. That being the case, I have added an option called "Use unsupported customizations" which will allow you to choose to use a workable (right now) but unsupported solution:
Xrm.Page.getControl("new_status")["_control"]["_element"].style.textColor = "#000000";
Again, this is unsupported code; it only applies to the .style property and it may not work in the next version of CRM.
New references to DOM elements representing the Section element are converted to the proper CRM 2011 equivalent:
crmForm.all.new_rep1commissionaccrual_c.parentElement.parentElement.parentElement.style.display = 'none';
prependOrgName is now being converted into: Xrm.Page.context.prependOrgName
ReadOnly is now converted into setDisabled().
When Stunnware Filtered Lookup code is found, a note is made in the conversion report.
Conversion of Outlook-related methods now more properly convert to
Xrm.Page.context.isOutlookOnline and Xrm.Page.context.isOutlookClient.
Modified the manner in which .text was handled. In certain cases an improper conversion was made, mostly related to the handling of XML documents. This has been corrected.
Empty Event Handling
In CRM 4.0 the method used to instruct CRM to submit a field to the database for updating, regardless of its ‘dirty’ state is called ForceSubmit, and is a boolean value. CRM 2011 uses a method called setSubmitMode, which requires a string argument. This leads to problems when converting code like this:
? "always" : "never");
This converts the boolean value of ForceSubmit to the string argument of setSubmitMode.
Hiding the Parent Row
Some developers were using code like this to hide the table row of the CRM form:
crmForm.all.isproductoverridden.parentElement.parentElement.style.display = 'none';
This now converts to the standard:
Changing Field Labels
crmForm.all.new_typenumber_c.innerText = NumFieldLabel;
now properly uses the supported setLabel method:
Changing Tab Labels
crmForm.all.tab3Tab.firstChild.innerText = accountType + " Details";
now properly uses the supported setLabel method:
Xrm.Page.ui.tabs.get(3).setLabel(accountType + " Details");
Instances where the name of a tab is being referenced by the textual name is now converted:
var tab2Hide = document.getElementById("tab" + tabIndex);
var tab2Hide = Xrm.Page.ui.tabs.get(tabIndex);
If the setting of the Precision property is found, the line will be commented-out since there is no CRM 2011 equivalent. Here is an example:
crmForm.all.new_contracttotal.Precision = 2;
The conversion alert for onreadystatechange was removed.
An exception would occur when an invalid Unicode character was encountered. The parser was modified to handle a wider-range of characters to prevent this issue.
Corrected conversion issues related to crmForm.all.field.DataValue when used with +=, -=, *= and /* .
The conversion report has been modified slightly and the worksheets rearranged putting the most important information toward the front of the workbook while leaving the informational data toward the back.
User Interface Changes
The UI for Transformer! is slightly different than previous versions with the most important feature the addition of an options page.
The following options are available:
Export folder allows you to select the folder where the conversion files will be placed.
ROI rate is the cost per hour should you feel the need to calculate how much time and Transformer! saved you.
Use Unsupported Customizations allows you to keep certain user interface element changes intact by using an unsupported method of coding.
Pack And Go
Checking the Pack and Go checkbox on the ribbon will create a .Zip file containing all of the files generated by the conversion process. This is very useful should you need to upload or email the files to an associate or your consulting partner, or whatever.
I am changing the licensing to better match my other CRM-related products.
Note: Existing customers will not be affected by the these changes.
Single Organization License
- $495 USD per CRM organization
- Annual maintenance $90, 1st year included
- One license covers use by unlimited developers
- Supports a single CRM organization
- $1,995 USD per development site
- Annual maintenance $360, 1st year included
- One license covers all developers within a single firm
- Unlimited CRM organizations
- $9,995 USD per legal entity
- Annual maintenance $1,800, 1st year included
- One license covers multiple-office partner firms, all of their developers
- Unlimited CRM organizations