Tuesday 2 April 2019

Tips to conduct a successful upgrade from CRM On Premise to Dynamics 365 Online


This blog post is more relevant if you are looking to upgrade from CRM 2013 or 2015 on premise to Dynamics 365 Online. However, some sections are relevant for all upgrades of Dynamics CRM/365 in general.
With all the features that are added at a very rapid pace to Dynamics 365 and all the features that are exclusive to the cloud version, a lot of companies are looking to upgrade from the current on premises version of CRM to Dynamics 365 online. What are some of the key aspects to consider before and after upgrading?

Before you upgrade

It’s a good idea to look at some of the known issues with your version of Dynamics CRM. For example,
  • The growth of the Async Operation Base table that can cause performance issues (Microsoft provides a resolution here);
  • The growth of the Principal Object Access (POA) table which can also cause performance issues and is mostly due to an excessive use of the record sharing feature (read Scott Sewell’s article about the POA table here)
This is not meant to be an exhaustive list, but the idea is look at what are the known issues or gotcha’s that cause problems in your current version of CRM and fix them prior to starting your upgrade. That way, you will not be upgrading you problems.

The Upgrade Process

While we wait for Microsoft to give us great news allow to import existing Dynamics CRM/365 databases to the cloud for restore, the current migration path to Dynamics 365 in the cloud is to create a solution package that contains cloud-compatible components and import it into a Dyn365 Online organization. That operation is followed by a data migration using the tool(s) of your choice (KingswaySoftScribe, CRM Import Wizard, custom solution etc.) to move your data from the on premise version of CRM to the Dynamics 365 in the cloud.
If you are on CRM 2013 SP1 or above, check to Solution Import version compatibility to ensure that your Solution can import into a Dynamics 365 organization. If you are in version prior to CRM 2013, you must upgrade to CRM 2013 SP1.
Now that you know that your solution will be able to import in Dynamics 365, there are changes that need  to be made prior to the move to the cloud and after.

General Considerations

  • You must ensure there is an existing mapping for your CRM users on premise with the cloud subscription your Dyn365 will be running on. You can use Azure AD Connect to make sure you users exists in both active directory.
  • You need to ensure there is connectivity between your existing integration points and your CRM Online instance. Generally, this means that your integration points must be somehow exposed to the internet.

Before you move to Dyn365 Online

  • Download, install and run the Custom Code Validation (from CRM 2015, for 2013). This will allow you to identify the possible bad JavaScript code and update prior to the upgrade.
  • In Dynamics 365 Online, all CRM plugins and custom workflow activities are configured to run in an isolated environment often refer to as sandbox.
    • Running in sandbox means some operations are not allowed. Update your plugins and custom workflow activities following the guidelines if needed:
      • Remove any IO operations read/write disk
      • Remove any operation that access the event logs
      • Remove any operation that access the registry
      • Ensure plugins and custom activities connect to web the right way (see recommendation from Microsoft here)
      • Validate there are no lengthy processes such as asynchronous workflows and/or custom activities. Processes running in a sandbox are configured to timeout after two minutes. If you have any processes of the sort, your options are:
        • Find a way to reduce the execution time of the existing processes
        • Remove the processes from CRM and replace by new functionality
        • Move the business logic to an external process that connects to CRM and perform the business logic on a dedicated machine managed by CFIA.
    • Finally, update the plugins and custom activities to running in fully trusted environment to run in sandbox using the plugin registration tool. If this is not done, you will not be able to import your CRM Solution in Dyn365 Online.
  • In Dynamics 365 Online, access to the CRM database views is not allowed. Reports written in SQL must be replaced
    • Update SQL-based reports to use Fetch XML for querying data
    • When it is not possible to reproduce the same type of complex queries with Fetch XML, you must consider other ways to run your reports (e.g. PowerBI, manual data export to SQL Azure database…)
These steps will remove components that will prevent your solution to be uploaded for Dynamics 365 Online. Once you have gone through the list, you can export your CRM 201x solution package and import it to your Dyn365 Online Organization (import to a dev org as unmanaged).

After you have moved for Dyn365 Online

This is when the fun begins! These are some of the key steps that you have to go through after the solution from a previous version of CRM has been loaded into Dynamics 365 Online.
  • Update plugin and custom workflows libraries SDK references (remove references to SDK version 6.x, 7.x, 8.0, 8.1, and add references to assemblies to SDK version 8.2, fix errors compile errors if any is found)
  • Update client side JavaScript code with new/enhanced Xrm.Page API methods
  • Update client side JavaScript code that calls the OData REST Endpoint to call the Web API instead (use Jason Lattimer’sREST Builder for a HUGE time gain).
  • Update Business Rules to leverage enhanced features where needed (e.g. ability to clear values, default branch, client and server scope etc.)
  • Open each Process Workflow, Dialog, Action (one by one), fix errors if any and activate
  • Open each Business Process Flow (one by one), fix errors if any and activate
  • Open each CRM form from used entities, verify the look and feel, adjust as needed
  • Open each dashboard (if any), validate look and feel and adjust as needed
  • Validate Sitemap and Application ribbons
  • Update your Email Router configuration (or Migrate settings from the Email Router to Server Side Synchronization)
  • Review and update functionalities as needed (e.g. replace plugins with Synchronous workflows or Business Rules, leverage other new features where possible and required) – this is a classic one liner that can take days, weeks or months to be completed depending on how complex your system is J
  • Export the solution as managed and import in your pre-prod (or other environment based on your internal release model) for testing
  • Gear up for your data migration using the tool(s) of your choice, test it, test it, test it again, then run it J
  • Go to production J
There you have it. It is always good to have a checklist of things to look for when upgrading a Dynamics CRM to the cloud (also applicable for partner hosted scenarios).

No comments:

Post a Comment

Git Basic working