Help with Upgrading MS CRM for multi-browser support

Microsoft released a beta version of MS Dynamics CRM that supports multiple browser types, but this also includes significant changes that will influence a great number of users and organizations that use Microsoft Dynamics CRM.

Even though Microsoft provides code samples and documented best practices to simplify development and facilitate future CRM upgrades, it doesn’t stop users from facing the problems with breaking customizations and solutions that don’t work anymore. Only solutions that have been created with the help of supported APIs for CRM 2011 as documented in the Software Development Kit for Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online will continue to work without issues. But what if your solution use unsupported methods?

Of course you can use Microsoft Dynamics CRM 2011 Custom Code Validation Tool, however it only highlights the problem, and it doesn’t provide a solution.

Below you can find some examples how problems that have been identified with the help of Microsoft Dynamics CRM 2011 Custom Code Validation Tool can be solved using JQuery and new SDK.

It wasIt should be now
insertCell $("<tr>").appendTo
document.all $(element)
attachevent $(element).bind
innerText $(element).text
FormType Xrm.Page.ui.getFormType()
crmForm Xrm.Page
AddParam addCustomView
Clear setValue(null)
SubmitCrmForm Xrm.Page.data.entity.save
GetLabelControl controlObj.getLabel()

Actually this table listed a small portion of the issues, but even these issues might require time consuming efforts and help with upgrading MS CRM for multi-browser support.

You might have a questionWhat are the most typical problems you might face?

To help you answer, below we listed the 5 mostly frequently met situations and issues that our customers had:

1. Assign event directly:
document.getElementById('new_field').onclick = FormerClientChange;

instead you can use functions:

Xrm.Page.getAttribute("new_field").addOnChange(myFunction);
2. Rename element in navigation:
if (document.getElementById('nav_myitem') != null) {
	if (document.getElementById('nav_myitem').children.length > 1) {
		if (document.getElementById('nav_myitem').children[1].tagName == "NOBR") {
			document.getElementById('nav_myitem').children[1].setAttribute('title', "Some text");
			document.getElementById('nav_myitem').children[1].innerText = "Some text";
		}
	}
}

instead you can use functions:

Xrm.Page.ui.navigation.items.get("nav_myitem").setLabel("Other Addresses");
3. Hide the field:
document.getElementById('new_field').style.visibility = 'hidden';

instead you can use functions:

Xrm.Page.getControl("new_field").setVisible(false);
4. Hide navigation element:
document.getElementById('nav_myitem').style.display = 'none';

instead you can use functions:

Xrm.Page.ui.navigation.items.get("nav_myitem").setVisible(false);
5. To use XMLHttpRequest do not use ActiveX objects directly:
objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");

instead you can use functions from jQuery $.ajax or the following function:

function GetXmlHttpObject() {
	var objXMLHttp = null;
	if (window.XMLHttpRequest) {
		objXMLHttp = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	return objXMLHttp;
}
Ready to move forward with our MS CRM services?
Call us today at +1 866 311 24 67 or get started.

Related Services

Dedicated Development Team
MS CRM Custom Development & Customization
Migration from MS CRM 4/11 to Dynamics CRM 365/9.0

How we process your personal data

When you submit the completed form, your personal data will be processed by WaveAccess USA. Due to our international presence, your data may be transferred and processed outside the country where you reside or are located. You have the right to withdraw your consent at any time.
Please read our Privacy Policy for more information.