Источник:
http://blogs.msdn.com/b/crm/archive/...-released.aspx
==============
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 Q2 2012 Service Update and Microsoft Dynamics CRM Update Rollup 9 includes 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
There are two main problem areas when JavaScript customizations are upgraded to the Microsoft Dynamics CRM Q2 2012 Service Update.
- ‘Red Group’: Existing JavaScript uses unsupported internal functions that were removed as part of the cross browser work. Many Microsoft CRM functions used techniques that were only possible using Internet Explorer. All supported public functions were preserved but many undocumented internal functions and properties were changed and are no longer available, even when using Internet Explorer.
- ‘Blue Group’: Existing JavaScript was written and tested only on Internet Explorer. It may not work correctly for other browsers. Code using the deprecated crmForm object from earlier versions of Microsoft CRM will not work for browsers other than Internet Explorer. Organizations using other browsers must upgrade their code to use the Xrm.Page object introduced for Microsoft Dynamics CRM 2011.
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
- Code that matches patterns for the Red Group is highlighted in red.
- Code that matches patterns for the Blue Group is highlighted in blue.
- The tool also provides a count of the number of occurrences of each JavaScript function or property that has been identified as a potential issue.
Red Group Issues
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
Blue Group Issues
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 Q2 2012 Service Update, so customers and partners will want to investigate whether these references are still valid.
Table 2: Blue Group matching patterns
.htc
<span style="font-family: courier new,courier; font-size: x-small;">