Experience your
30 day trial
now!
GET STARTED
Download: Microsoft Dynamics CRM 2011 Custom Code Validation Tool
The purpose of this tool is to assist customers and partners of Microsoft Dynamics CRM identify potential issues with their custom JavaScript in JavaScript libraries and HTML web resources. The Microsoft Dynamics CRM Q4 2012 Service Update will include significant changes in the web application in order to be able to support a variety of browsers such as Safari, Chrome, and Firefox. When using JavaScript code in Dynamics CRM, it is possible that some code will stop working or cause an error when you upgrade. For more information see Resolve Breaking Script Issues When Upgrading to the Next Release of Microsoft Dynamics CRM.
This post includes details about:
Problem Areas
Red Group Issues
Blue Group Issues
False Positives
Microsoft Dynamics CRM 2011 Custom Code Validation Tool Setup
There are two main problem areas when JavaScript customizations are upgraded to the Microsoft Dynamics CRM Q4 2012 Service Update.
Note: After your Microsoft Dynamics CRM Online organization has been upgraded to the December 2012 Service update, if you have any issues caused by code in the Blue Group you may be able to address them by changing the HTML Component Support setting found in the System Settings Customization tab. Check the Include HTC support in Microsoft Dynamics CRM forms checkbox. As long as your form scripts have dependencies on these HTC components they must continue using Internet Explorer version 9 or lower. Internet Explorer 10 does not support HTC components. For more information see Use JavaScript with Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online : Write JavaScript for Multiple Browsers
The tool examines each custom JavaScript and HTML web resource in the organization that the tool is installed in. Each web resource is displayed in a list box at the top of the tool form. Clicking each web resource will show the issues that are found with the JavaScript that is part of that web resource as shown in Figure 1 Custom Code Validation Tool UI.
Figure 1 Custom Code Validation Tool UI
Red Group issues need to be addressed in order for users to be able to use the application as they had done previously. These issues affect all browsers.The following Table 1 : Red Group matching patterns contains the internal, unsupported JavaScript functions and properties that were available in previous versions of Microsoft Dynamics CRM.
Table 1 : Red Group matching patterns
‘crmGrid’
.ShowAppNav
.IsValid()
.SubmitCrmForm
.IsReadyToClose
.detachCloseAlert
.RunReport
.Print
.BuildXml
.BuildXmlToSubmitForm
.SetFieldReqLevel
.SetAllFieldsToNonReqLevel
.displayMissingValue
.GetLabelControl
.FireSaveEvent
.HideField
.VerifyFieldIsSet
.SetDeferredCmdId
.CheckFormDirty
.CloseAlertAttached
.SetViewportTabSection
.ModifyMinimumTabHeight
.GetXml
.ParseXml
.RaiseOnChange
.CreateInnerSlug
.ResetToDefault
.ResetDefault
.FormatDuration
.AddDependentParameters
.AddParam
.AddBindingColumn
.getLookupField
.Clear
.Lookup
.AddItems
.Items
.RemoveItem
.UpdateItem
.IsPermissibleType
.RaiseOnAfterSelectEvent
.RaiseOnChangeEvent
.RaiseSetAdditionalParamsEvent
.AreValuesDifferent
.RefreshLookupItemImage
.GetLookupTypeIcon
.attachEventHandler
.GetDataXml
.SetCurrency
.InitializeLookupPresence
.QueryLookupPresence
.SetTime
.AddOptionGroup
.InsertSlugControl
.UpdateOperatorControl
.UpdateInnerHtml
.DeleteDataSlug
.CurrentOperatorIsClear
.CalculateDataSlugTabIndex
.refreshTimeValue
.attachAsOnlyHandler
.GetLookupControl
.DefaultValue
The following Table 2: Blue Group matching patterns identifies the code that may not work for browsers other than Internet Explorer. Some of the elements are simply references to Microsoft technologies, such as ActiveXObject, which are not supported in other browsers. Others are references to the Document Object Model, which may have changed as part of the CRM Q4 2012 Service Update, so customers and partners will want to investigate whether these references are still valid.
Table 2: Blue Group matching patterns
.htc
<msxsl:script
jscript
<xml
crmForm.all
document.selection
.createTextRange
onfocusout
onfocusin
onmouseleave
onmouseenter
style.textDecorationLineThrough
.insertCell(
.insertRow(
cursor:hand
.item[
.rules
.parentElement
.tags(
<script for=
::
.selectSingleNode
.selectNodes
.text
.xml
ActiveXObject
.attachevent
debugger
.additionalparams
.getElementById
window.location.href
.document.activeElement
event.cancelBubble
window.openPopup
.setFirstElementFocus(
.loadXml
.load(
.transformNode(
.childNodes.length
.hasChildNodes
.firstChild
.lastChild
.nextSibling
.previousSibling
.childNodes[
.contains(
.openStdDlg(
dblclick
oncontextmenu
.dir
.innerText
.outerHTML
.currentStyle
.styleFloat
opacity=
.isContentEditable
window.navigate
.srcElement
.returnValue
document.all
.createNode
document.appendChild
document.styleSheets(
rows(
cells(
document.forms(
options(
options.remove
.add(
.insertAdjacentElement
.insertAdjacentHTML
.Save(
.SaveAndClose(
.FormType
.ObjectTypeCode
.ObjectId
.ObjectTypeName
.RequiredLevel
.SetFocus(
.FireOnChange
.Min
.Max
.DataValue
.isDirty
.Disabled
.SelectedOption
.SelectedText
.SortingEnum
.Sort
.SelectedIndex
.InnerText
.OptionsXml
.Precision
.DataXml
.Text
.Value
.DisplayValue
.WillSubmit
.DataChangeHandler
.BypassValidation
.AllowFormFocus
._bSaving
._htcInitCompleted
.SubmitFormId
.NO_DATA
.RefreshOnSave
.Visible
.ForceSubmit
.Form
.TimeControl
.isInitialized
.allowblankdate
.IsMoney
.IsBaseCurrency
.CurrencySymbol
.CurrencyPrecision
.IgnoreCurrencySymbol
.IgnoreRange
.PrecisionChangeHandler
.TrimValue
.MaxLength
Enumerator
This tool will identify some false positives in the JavaScript. Any of the functions or properties listed in the tables mentioned previously that is part of commented code will be identified in the Results text box. These can be safely ignored as the code is commented out and cannot be executed.
The tool also cannot determine the intent of the script being analyzed. This means that it cannot determine whether the script will function correctly if it needs to interact with other custom JavaScript functions. For example when performing feature detection it is common to detect whether a particular feature is available in the current browser and route the logic to use different code depending on the browser. In this case, code that only works for Internet Explorer would exist and does not represent a problem.
Every effort was made to identify those functions and properties being used in custom JavaScript and HTML web resources that may affect customers and partners. The list is as comprehensive as possible, but there may be other issues that this tool does not identify that could affect the functionality of the existing customizations. The tool should not replace standard testing practices to ensure the customizations continue to work once the CRM Q4 2012 Service Update is applied.
The tool is provided as a managed solution which can be imported into any Microsoft Dynamics CRM 2011 organization. You must have the Import Customizations Privilege to install the solution. Users with the System Administrator or System Customizer security role typically have this privilege. To install the solution, follow these steps.
Hi,
Is there any resource or white paper that will help us resolve issues in BLUE GROUP area?
Gday,
We're currently trying to use this to check our scripts for issues before upgrading to the latest Polaris update, but are having trouble getting it to run. It shows a loading percentage for a split second and then... nothing. No error message or anything that would provide insight, just a blank page. I've looked up a few proposed solutions regarding changing language and checking the WebResourceBase table for records with NULL Content values, but neither has helped. I've also tried running it on another CRM instance and also on co-worker's computers, to no avail. What else can I do to figure out why this tool isn't working?
Thanks,
Matt W
I downloaded this tool this morning and it will not work. I installed silverlight and all I get is a blank screen. I also found the proposed solution regarding WebResources and ours did not have any nulls in it so this solution did not work for us. Are there any other solutions to get this tool to work?
same issue as KimB2009, it seems silverlight crash some how. anyone knows the cause and fix. thanks.