This free converter converts a single segment of code at a time using a search and replace operation. A list of conversions may be found here.
Code Conversion Categories
This is a very straightforward conversion from one object model to another. For example:
crmForm.all.name.DataValue = “my company”;
The next level up is more manual labor, but it is still possible with a medium amount of effort.
// No requirement crmForm.all.new_field.req = 0; crmForm.all.new_field.setAttribute("req", 0); // Recommended crmForm.all.new_field.req = 1; crmForm.all.new_field.setAttribute("req", 1); // Required crmForm.all.new_field.req = 2; crmForm.all.new_field.setAttribute("req", 2);
Xrm.Page.getAttribute("new_field").setRequiredLevel("none"); Xrm.Page.getAttribute("new_field").setRequiredLevel("recommended"); Xrm.Page.getAttribute("new_field").setRequiredLevel("required");
An example of the hard category would be SOAP calls. There is not a really good way to programmatically convert them so you resort to a manual conversion/rewrite process.
Some things do not convert at all, either because of the technique or technology used, or because they are no longer applicable.
You will find the following examples:
- Button manipulation code
- Inline grids
What the hell were they thinking?
I have seen code that in all honesty, is scary. In some cases, very scary. Sometimes it is because the personally really knew what they were doing, in others it was because the person did not know what they were doing. Regardless, you sometimes see code that is just better if you threw it away and found a better way around the problem.