Performance issue after upgrade to CRM 2015

While working on one upgrade project, after successfully completion of all activities there were multiple performance issues experienced. While we were trying to troubleshoot the issue, may be in wrong direction; found this great article today from Sudhir Nory which explains the root cause. This may not be the issue for all performance issue on upgrade projects but is surly helpful to know.

When a database is upgraded to SQL Server 2014 from any earlier version of SQL Server, the database retains its existing compatibility level if it is at least 100(SQL Server 2008 R2). If the compatibility-level setting is 110 or lower it uses the old query optimizer which may not be effective. We found the current compatibility level displayed in the Compatibility level list box was SQL server 2008 for the ORG_MSCRM Database SQL Server 2014 includes substantial improvements to the component that creates and optimized query plans and gets utilized only when database compatibility level is reset to 120 (SQL server 2014).

http://blogs.msdn.com/b/crminthefield/archive/2015/06/04/improve-crm-query-performance-using-compatibility-version-120-when-using-sql-2014.aspx

Advertisements

DID YOU KNOW? List component for SharePoint integration deprecated with CRM 2015 Update 1


[Referencing The Microsoft Dynamics CRM Blog]

The Dynamics CRM to SharePoint integration has always been a key solution to document management within CRM.  With two currently available solutions, the List Component and new server-based SharePoint integration, CRM is pleased to focus our efforts on the server-based integration.  Dynamics CRM 2015 Update 1 will deprecate the List Component as a result of SharePoint’s deprecation of the sandbox solution, a dependency of the List Component.

Customers with List Component are advised to upgrade to the server-based SharePoint integration.  With CRM 2015 Update 1, server-based integration gains hybrid support between CRM Online and SharePoint On-Prem.  In a subsequent release, CRM will support CRM On-Prem to SharePoint Online and CRM On-Prem to SharePoint On-Prem.  SharePoint Online or SharePoint Server 2013 SP1 and above is required for server-based integration.

The new form rendering engine

***[Referencing to Microsoft Dynamics CRM Team Blog]

In Microsoft Dynamics CRM Online 2015 Update 1 (v7.1), a new form renderer was built to provide better performance. Forms will load significantly faster and more efficiently. The new renderer is based on previous generations and has the same functionality and behavior. However there are some things that admins and developers need to do to ensure full compatibility when upgrading.

What will users notice?

End users will not notice anything different, other than forms loading faster. The new form rendering engine has full support for client scripting (Write code for Microsoft Dynamics CRM forms), uses the same XML definition (Form XML schema), and has the same behaviors all around. There have been no fundamental changes made in terms of what the form does.

In order to help catch unsupported customizations, we added a dialog that displays the issue when script errors occur so that they do not fail silently. If these symptoms occur then it is likely there are unsupported customizations in the system.

What changed?

All the changes have been focused on how the form load process can be optimized. There are 2 main changes that have been made: loading process of the form, and handling of cache.

In terms of loading process, we have parallelized as many operations as possible to eliminate time wasted because the browser is idle. We increased the content that’s cached, moved rendering processes partially to server-side, and optimized the initialization of controls.

Form load used to be a very linear process. Since the new form renderer is more parallelized, the rendering engine now constructs the form and XRM model first and binds the data whenever the server responds. The diagram below is a rough approximation in order to illustrate the differences between the 2 rendering engines and may not reflect the exact changes.

Forms also used to waste a lot of resources. Since they were hosted in iframes, the iframe would be discarded and reloaded on each form load. The new form renderer does not discard iframes and instead keeps the iframe around. All common scripts are already parsed and never need to be loaded again. This introduced the design to load custom scripts and ISV scripts in a separate iframe which is the one that’s discarded when the form closes.  Previously, these scripts would be loaded in the same iframe as the form.

In summary:

  • Iframes are now kept throughout the user session
  • Custom scripts are loaded in separate iframes
  • No changes in supported scripts or form
    capabilities

What do I need to do?

As an admin or developer there are some things to be aware of. Because the new form rendering engine makes changes to how iframes are organized, any attempt to access unsupported APIs or use direct DOM manipulations may fail and need to be fixed.

Customers should all make sure to test their organization in sandbox mode to preview before upgrade. This way, should any symptoms show up around forms not loading/script errors, you will be able to catch and fix it
before upgrade.

Examples of things that will break:

  • Any attempt to access DOM in the content iframe using JS, jQuery or other 3rd party libraries (document.getElementById() or jQuery selectors)
  • Creating a new HTML content in the parent window for persistent content (and assumed that the parent window was the main CRM iframe.
  • Window.load, parsing iframe/form URL
  • Attempting to use unsupported (non-XRM) APIs, especially undocumented ones that may have been shipped with CRM for internal usage only
  • Accessing window.parent() from a web resource that may assume for example there’s a variable set in the current window context.

In order to help identify potential issues, the CRM 2015 custom code validator can be used. It’s primary purpose is to identify usage of deprecated APIs but it will also attempt to flag usage of unsupported APIs. The tool can be found here: https://www.microsoft.com/en-us/download/details.aspx?id=45535.  Developers should also review their scripts to ensure only supported APIs are being used.

Customers that have 3rd party solutions should reach out to their partners for updated solutions that have been verified to work with the new form rendering engine. While most are expected to continue to work, those with unsupported customizations need to be updated.

Fallback options

In case there is difficulty identifying the issue or a backup plan is needed post-upgrade, we have introduced an organizational-level fallback to temporarily allow usage of the legacy rendering engine. This will ensure compatibility at the cost of performance. Do not rely on this solution long term as the plan is to remove this option in the following release.

This setting can be found under Settings -> Administration -> System Settings -> General. Select “Yes” under “Use legacy form rendering” to enable this mode for all users.

If script errors are showing up, or if forms are not behaving as intended, this setting can be used to diagnose if the problem is specific to the new form rendering or not. If it is due to the new form rendering engine, then most likely there are some unsupported customizations.

If you are the owner of the scripts, make sure that there are no unsupported customizations. Otherwise reach out to the provider of the solutions for an updated solution.

View article…

BingMap support for custom entities

Indeed BingMap integration is a great feature provided with CRM 2013 and 2015, but unfortunately list of entities that support BingMaps control is limited to Account, Contact, Lead, Quote, Order, Invoice, Competitor and System User. This is because BingMap control requirers the composite Address field to be added to CRM form and these composite controls are not available for custom entities.

I came across a good article from Freelance Development for Dynamics CRM which provides a UNSUPPORTED way to ass BingMap control even to custom entities. Worth checking as there are many scenarios where we may need this feature for custom entities.

Make CRM work on your voice commands

Here is something interesting about voice commands for CRM. For those who don’t know what Cortana is, Cortana is your personal assistant for windows phones. Get a brief idea about Cortana here.

Cortana voice commands for Microsoft Dynamics CRM for phones

You can use the following CRM voice commands with Cortana. Cortana voice commands for CRM are only available in English at this time.

To do this in CRM Say this
Open an item CRM open <item> called <item name>.

Example:

“CRM open account called Contoso.”

Variation:

“CRM open account named Contoso.”

Show a view CRM show <view name>.

Examples:

“CRM show my active accounts.”

Variation:

“CRM show me my active accounts.”

Search for an item CRM find <item> called <name>.

Example:

“CRM find account called Contoso.”

Variation:

“CRM find account named Contoso.”

Create a new item CRM create <item type> called <item name>.

Example:

“CRM create contact called Maria Campbell.”

Variation:

“CRM add new contact named Maria Campbell.”

Create a phone call activity CRM remind me to call <call name>.

Example:

“CRM remind me to call Maria Campbell to set up appointment.”

Create an appointment CRM schedule meeting to <subject>.

Example:

“CRM schedule meeting to discuss quote with Maria Campbell.”

Create a task CRM remind me to <task name>.

Example:

“CRM remind me to email Maria Campbell.”

Variations:

“CRM follow up Maria Campbell.”

“CRM follow up with Maria Campbell.”

“CRM follow up on Contoso.”

Open task list CRM what should I do next?

Example:

“CRM what should I do next?”

 

Note: The create commands work only with Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update. The other commands work with Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online as well as Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update.

Deprecation of unsupported configurations in CRM Online 2015 Update

Important information about supported configurations in the next major release for CRM

Changes in browser support

For the next release, Microsoft is discontinuing support for the following browser versions:

  • Internet Explorer 8
  • Internet Explorer 9

Note: Accessing CRM 2015 Update via IE8 or IE9 will not block or redirect you to a different experience. Code fixes will only be considered for issues that can be reproduced with a supported web browser.

Changes in items specific to the CRM application

Removing the support of the following client SDK (JavaScript) APIs:

  • context.getServerUrl (use getClientUrl instead)
  • context.isOutLookClient (use client.getClient instead)
  • context.isOutlookOnline (use client.getClientState instead)

Also modifying the possible return values from Xrm.Page.ui.getFormType to remove the Read Optimized and CRM 4.0 Quick Form types. This means that removing two values from the possible results of getFormType. However, it’s unlikely that your code will be affected by this because we removed the forms types in CRM 2013 SP1 and CRM Online Spring ’14.

Form System

Removing the support of the following form item CRM 2011 or Information forms that were updated in CRM 2013 for certain updated entities. This means that you should migrate your forms for just these entities to use the new CRM 2013 SP1 and CRM Online Spring ’14 form system before upgrading to CRM Online 2015 Update. If you are unable to do this, these forms will still work in CRM Online 2015 Update; however, new functionality that we make available in CRM Online 2015 Update may not be available on these forms. We strongly encourage you to migrate to the new Form System.

Entities

The Kit type of Product will be deprecated, which means that we’ll do base testing only and will be removing this feature in a future release. Please update any customizations that use products defined as kits’ failing to do so will block and conflict with new product type advancements in the near future. To learn more about Kit type see Product catalog entities.

Email Router

Support for Exchange 2007 connectivity to and from the Microsoft Dynamics CRM Email Router will be deprecated, which means that we’ll do base testing only and will be removing this capability from the Email Router in a future release. Please see email router supported versions of Exchange Server.

2007 SDK SOAP Endpoint

We’ll be removing this endpoint in CRM Online 2015 Update, which was deprecated in CRM 2013 SP1 and CRM Online Spring ’14”. You shouldn’t use this endpoint for any new extensions.

Office 365 Security Role Changes

We’ve updated the way that CRM Online synchronizes data with Office 365. There will be a slight change to how security groups can be chosen to associate to an organization instance. Previously, it was possible in the instance settings page to choose either a Security Group or a Security Role (such as Company Administrator) and have only licensed, enabled users that belonged to that Security Group or Role enabled in the corresponding CRM organization. After the upcoming changes, it will not be possible to choose a Security Role for an organization instance in the instance settings page in the Office 365 Admin Center. This change impacts only the user experience of selecting a Security Group for user sync management; it does not impact the synchronization process for those organizations that have already selected a Security Role. In those cases, users will still be enabled or disabled in the organization instance based on membership in the selected Security Role. However, going forward you will need to decide on a new Security Group to replace the existing Security Role for user membership management.

In addition, we will be proactively identifying customers that are affected by this change and will be sending a targeted communication

Critical On Demand Fix: Modal dialogs not supported on Google Chrome 37

Few months back I had written a post on Google Chrome version 37 had stopped supporting model dialog (here). This affects if you open up the form customization and try and save and publish in Chrome (Version 37 and higher), you may notice it does not save or publish. This is because Dynamics CRM is using a modal dialogue, likewise you may see this behavior on editing dashboards or updating status reasons.

The current fix for this is a registry update which can be found here http://support.microsoft.com/kb/3000002, or using an alternative browser.

Microsoft has announced that in April they will be releasing updates that will fix the feature deprecation. In order for customers, who are using Chrome browser, to continue to function, they will need to upgrade to the upcoming CRM versions listed below:

  • CRM 2011 – A COD will be delivered on CRM 2011 UR18(On prem Only)
  • CRM 2013 – A COD will be delivered in CRM 2013 UR3(On prem Only)
  • CRM 2013 SP1 – Fix will be included in CRM 2013 SP1 UR3(Online & On Prem)
  • CRM 2015 – Fix will be included in CRM 2015 UR1(Online & On Prem)

*Note: COD = Critical On Demand Fix

Please be aware that these updates are coming and will need to be applied to your environments to ensure Chrome based users can fully function on the latest versions.