Dynamics CRM Upgrade – On-premise to Online (Part 2)

dynamics crm upgrade onpremise to online

This blog is a continuation of my last blog Dynamics CRM Upgrade from On-premise to Online (Part 1). In Part 1, we discussed the steps for Dynamics CRM upgrade. There are a lot of other areas or surprises which need to be looked into during upgrade like:

  • Export Security Roles from Child Business Units: In some scenarios where organizations do not have proper Dynamics CRM administrator, you will end up finding a lot of issues. One such example is Security roles created under child business units. Security roles created specifically under a child BU cannot be added to a solution, hence migrating the same becomes a challenge. But if the upgrade is from Dynamics CRM On-premise to Online, this situation can be managed. My blog entry CRM Upgrade – Export Security Roles from Child Business Units explains how to manage this situation.
  • Migrating Reports: Reports created from report wizard mostly do not cause any problems, but there can be issues with reports created using SQL as these are not supported in Dynamics CRM Online. These reports need to be re-written using Fetch XML. Following free online tool can help in converting SQL statements to fetch XML: SQL2FetchXML.

Apart from SQL-based reports, one more factor can be a problem if your customer’s users have created a lot of individual reports and want migration of these individual reports as well. There is no direct way of adding “Individual” reports to a CRM solution, but there is a workaround which can be done, however, this requires some effort. The way you can achieve this is to edit each report one by one and convert them to “Organization” reports. By doing this, you will be able to add them to the solution, hence you’ll be able to export and import them. Once imported, these reports and can be re-edited back to individual reports.

  • Issues with data import: Data import is a quick way of importing data to Dynamics CRM and can also be used as a daily integration tool. It is quite easy for business users to use data import, but if your customer is using data template in XML format from Dynamics CRM 4.0 or CRM 2011 to create an import file, then you might be in trouble. The notion of these files is that when you are importing an XML file and it has the record GUID, Dynamics CRM uses it to update the record. But with CRM 2015 Update came the Excel import functionality, hence update of a record doesn’t work with older data template-based XML data imports. You can read more about it in the article 2015 Update 1: Export to Excel Redesigned.

If your customer is using these features, then you may want to look at how that process should work after the upgrade.

  • Issues with the upstream/downstream system: Since the Dynamics CRM SDK is changing continuously, there is a need to really look into integrations. Any system using 2007 CRM endpoint should be upgraded to work with CRM Online. Also, there has been a lot of performance improvement, and a lot of SDK changes have been made to support that, like optimistic concurrency. There are endless changes beyond the scope of this blog post, but the idea is that it makes real sense to re-look at the integrations points.

I hope this will help those doing Dynamics CRM upgrade from CRM On-premise to CRM Online. In my next blog post, we will see some of the other issues or blockers with data migration and how to resolve them.

Advertisements

Dynamics CRM Upgrade – Export Security Roles from Child Business Units

fast business pace - dynamics crm upgrade - export security roles

In the modern enterprise world, the only thing which is constant is change. Most people would agree that the pace of change is accelerating. The pace with which businesses are done is changing. It’s of utmost important to make right decisions while implementing enterprise products.

The best possible manner change can be controlled is by keeping our solutions within the limit of best practices and guidelines. It is easy to make the customer happy for that time and keep doing unsupported customizations, but it is tough to explain what’s best in their interest from a solution management point of view due to varied reasons. We should make sure to guide the customers with pros and cons of too many or unsupported customizations.

As the technology keeps changing, the upgrades to the existing Dynamics CRM implementations are the only option customers have. It can be controlled to some extent in On-Premise implementations but with the online implementations, the windows are very small.

In this blog, I am going talk about migrating security roles which are created for child business units. Out of the box, Dynamics CRM doesn’t support export of security roles which are created for child business units, and there is no supported way to do it.

Let’s first talk about the best practice:

Security roles should always be created at the root Business Unit (BU) level which are then inherited by child BU’s. By doing this, you can simply migrate the security roles using solutions. 

Now let’s go through the scenario:

Problem Statement

While doing upgrade I found that the customer has few Business Units which are the child to parent Business Unit, and a few roles created under child Business Units. For example:

Three Business Units: B0, B1, and B2

B0 is a default/root business unit.

B1 and B2 are child business units

Three roles: R0, R1, and R2

R0 can be directly added to solution and is an inherited role for B1 and B2

R1 is under B1 BU which means it is not a part of B2 and

R2 is under B1 which means R2 is not a part of B1.

Now during the upgrade, if I have to upgrade from Dynamics CRM on premise to Dynamics CRM Online, there is no way we can do an in-place upgrade or database restore. The only way it can be done is to use solutions export and import.

Important FAQ

Since role R1 and R2 cannot be added to a solution, is there a supported way to achieve this?

The answer to this is there is no supported way to achieve this.

What’s the solution to this problem?

Usually, I never support going and making changes in CRM database, but in scenarios like this if we have a lot of security roles. During Dynamics CRM upgrades, we generally will never have a lot of time to get the requirements and recreate the security roles since that can take a lot of time and is not a cost-effective solution for the customer.

The quick solution to this is:

  1. Take a SQL backup of production CRM organization
  2. Create a new organization by restoring that SQL backup
  3. Import the organization using Deployment Manager

Once you have imported that organization:

  1. Login using SQL Management studio
  2. Find the GUID of the root BU of the production organization
  3. Run the following update statement for all the roles to be exported.

UPDATE [YOURCRM_MSCRM].[dbo].[RoleBase]

SET [BusinessUnitId] = < GUID of the Root BU>

WHERE [RoleId] IN (GUID1, GUID2…..<GUID of the role to be updated>)

GO

Note: You will get the RoleID for each of the roles from the same table “[YOURCRM_MSCRM].[dbo].[RoleBase]”

Once you have performed this activity, you should be able to add the security roles to the solution and export it.

I hope this helps some of you in managing situation like these during Dynamics CRM upgrades.

Dynamics CRM Upgrade – Approach for Migrating Users from CRM On-Premise to CRM Online

In today’s fast-paced technology world, almost everything is becoming more and more integrated because of IoT and Cloud. Customers are also upgrading their on-premises systems to cloud. It’s now happening in almost every enterprise to ensure they can keep up with the pace and reduce their IT spending.

I would say “Cloud is the new black” for every enterprise across the globe.

The same is true with customers having Microsoft Dynamics CRM 4.0, 2011 and 2013 installations. Almost every customer using these on-premises installations is fascinated with the direction and pace in which Microsoft Dynamics CRM Online is going, and wants to catch the train as early as possible before it’s too late. This brings about the need for data migration from Dynamics CRM on-premises installations to Dynamics CRM Online.

One of the most important aspects of data migration to CRM Online is the right strategy for user migration. In this blog, I will discuss this very aspect of migrating users to Dynamics CRM Online.

It’s very important to decide on how the users need to be migrated to Dynamics CRM Online. There is a question that needs to be answered to come up with an approach:

  • How to manage disabled users in Dynamics CRM Online?

To answer this question, first, we need to answer two very important questions to come up with the right kind of user migration strategy.

  • WHAT are the different types of CRM Online users?
  • HOW are they created?

These questions are crucial for coming up with the right strategy for user migration to CRM Online.

Firstly, we need to understand WHAT the different types of CRM Online users are.

Four types of users in Dynamics CRM Online

  • Full Users
  • Non-interactive users
  • Synchronized users
  • Stub Users

Full Users – Users who are synchronized Office 365 users and are licensed to work for a full user of Microsoft Dynamics CRM.

Non-Interactive Users Users who are synchronized Office 365 users but can only access CRM using web services.

Synchronized Users – Users who are synchronized Office 365 users but are not given a license in Office 365 admin portal or whose license is removed through the admin portal. These are similar to disabled users who can own and share records.

Stub Users – A very important type of user in CRM Online are stub users.  Stub users are placeholders of user records. These kinds of users never synchronize with Office 365 and can never be created from Office 365 admin portal. They can never be enabled and can never log in, i.e. once created, you cannot enable, delete or synchronize these users with Office 365.

A question arises here. When these users are just placeholders and will just sit in CRM Online, why create them in the first go? We will answer this question, but first, let us tackle how these users are created.

HOW does each type of user get created in Dynamics CRM Online?

The following table explains how each of these users can be created in CRM Online:

users in crm online - migrating users to crm online

Now let’s start answering our questions.

Full Users and non-Interactive Users have clear usage and are fairly easy to understand, as these are situation based users and depend on whether the users will use CRM UI or not.

But how about Synchronized and Stub User? When do you create a Synchronised User and a Stub User?

The answer to this question depends on whether you have disabled users while doing data migration to CRM Online. If you have disabled users, it is of utmost important to ask the following questions to your client:

  • What is the policy of the organization for user management in Active Directory, i.e. when a user leaves the organization? What do they do with that user? Do they soft delete the user record or hard delete?
  • Alternatively, the question could be, when an old employee joins back, do they create a new user or enable an old existing user in Active Directory?

If they are doing a soft delete, then Synchronised User makes a good approach for creating disabled users since the client would not want to keep duplicate users in CRM.

Otherwise, if they are hard deleting the users from Active Directory, then the only option is to create Stub Users for creating disabled users.

Having said that, a lot depends on your client with regard to what they want to achieve. So before making a decision, make sure you explain the merits and demerits of each of these users and help them in making an informed decision.

After all, a happy customer is a repeat customer. 🙂

I hope this helps.

 

 

 

 

Dynamics CRM Upgrade – On-Premise to Online (Part 1)

dynamics_crm_online_logoIn this blog, we are going to talk about the areas one should consider checking out while working on an upgrade project. Following steps can help in planning a Dynamics CRM upgrade:

Finalize the upgrade path

First of all, when upgrading Dynamics CRM, it is important to check the upgrade path, e.g. upgrading from CRM 4.0 to CRM 2016 Online. The following TechNet article provides the details of upgrading from Dynamics CRM 2011 or CRM 2013 along with the best practices which one must follow: Upgrade from Dynamics CRM Server 2013 or Dynamics Server 2011.

Finalize the upgrade methodology

One must also consider the pros and cons of each of the upgrade methodologies. Following TechNet article provides details on Dynamics CRM upgrade methodologies: Upgrade Microsoft Dynamics CRM Server.

Dynamics CRM Customizations upgrade

Once you have decided on the upgrade path and upgrade methodology, the next step is to check CRM customizations done in the existing environment. Following are the various areas which we should carefully verify during upgrades:

  • User migration: A lot depends on how the users will be migrated to Dynamics CRM Online. Check with your customer how users will be migrated to CRM Online since each organization will have different requirements on how they manage their users. Some organizations disable users in AD when they leave the organization, while some delete the users from AD. Also, there can be a lot of issues with users in current production, e.g. the user might be disabled in AD since he/she has left but still be active in CRM.

User migration is one of the most important steps to consider and needs to be communicated effectively since a decision on creating a stub or synchronized user can severely affect data migration. For more details on user migration strategy, go over my earlier blog post: Approach for Migrating Users from CRM On-Premises to CRM Online.

  • Plugins & workflows: Ask for the source code of the plugins, otherwise, communicate with the customer accordingly and try to recover source code. The following blog explains how to get the source code from the database: CRM 2011 – How to download plugins in the database to a file.

Once you have to get the plugin assembly you might have to decompile plugin code, here’s how you can achieve that: CRM 2015 – How to decompile a plugin Assembly (DLL).

Next, verify that the plugin assemblies are not using 2007 endpoints.

Also, check if the plugins are not doing any file IO operation since in sandbox mode that would not work. A lot of times we end up running SSRS extensions in the plugins to generate a PDF and attach it to an email which is not supported in CRM online so make sure you communicate this to your customer.

  • JavaScript: When using JavaScript code in Microsoft Dynamics CRM, it is possible that some code will stop working or cause an error when you upgrade. The Microsoft Dynamics CRM Custom Code Validation Tool helps identify potential problems so that a developer can fix them. Following is the URL of the custom code validation tool: Microsoft Dynamics CRM 2013 Custom Code Validation Tool.

Convert the CRM 4.0 JavaScript code to CRM 2011 JavaScript web resources using CRM 4 to CRM 2011 JavaScript Converter.

Do make sure to replace all the deprecated API from CRM 2011.

Since Dynamics CRM 2011 endpoints and CRM oData service are deprecated, hence plan and replace the same to Web APIs. Here are few blog posts which can help in upgrading to Web APIs.

Web API: Next Big Thing for Developers (Part 1)

Web API: Next Big Thing for Developers (Part 2)

Web API: Next Big Thing for Developers (Part 3)

In my next blog post, we will see some of the other issues or blockers which one can encounter during upgrades, and how to resolve them.

I hope this blog entry will help those doing Dynamics CRM upgrades from CRM on-premise to CRM Online.

Adding a custom button for a hosted control in Unified Service Desk

A lot of times in Unified Service Desk (USD) we need to hide CRM ribbon since it has a lot of controls/buttons which may disturb or impact the functionality being provided/implemented in USD (e.g. “Save and Close” button if not hidden will end up closing the browser in the USD hosted CRM Page control). We want to show a specific ribbon button of the ribbon like in my scenario I wanted to show the service calendar with only the “Schedule” button.

1

The possible solution of the above mentioned problem are:

Solution Option 1

Hide the “Save and Close” button, but what if the same form is to be used by a different user, hence this solution will only work if the form has to be only opened in USD otherwise this won’t work.

Solution Option 2

Create two different forms, one which will show up in USD and other to be shown only to CRM user. Here also there is a limitation, what if there is a lot of scripting written for that form, then we will end up doing redundant work for both the forms.

Solution Option 3 – a preferred solution

Recently, I came across a similar kind of scenario where neither of the solutions mentioned above worked and I had to take a different approach. Unified Service Desk configurations provide us with a solution for these kind of problems. We can achieve this by using custom toolbar button for that hosted control.

I wanted to use the out of the box service scheduling functionality on click of “Schedule” button available in service calendar, but did not want to show the complete ribbon on the CRM service calendar form. One interesting thing regarding the out of the box “Schedule” button is that it provides you the functionality to find the resources available during specific times in specific locations. I had to mimic the same functionality in USD and the only proper way was to do the same way, what CRM does out of the box rather that reinventing the wheel.

We will now look at how to create a custom “Schedule” toolbar button in the USD which can imitate an action similar to CRM “Schedule” ribbon button.

To do this we have to do the following steps:

  • Create a new toolbar “Service Calendar Toolbar”

2

3

  • Create a new toolbar button “Schedule”

4

  • Schedule button on Create a new “Action Call” to launch service activity from USD.

5

Data   LogicalName=serviceappointment

loadDialog=true

  • Now we have created a toolbar button but it needs to be associated to a hosted control to make sure it is visible on Service Calendar Hostel Control. On the Service Calendar toolbar which we created in step 1, navigate to Hosted Control using left navigation as shown below:

6

  • Add the “Service Calendar” hosted control as shown below

7

NOTE: The beauty of toolbar controls is that it’s a generic control. If you have generic functionalities like “going to home page”, “going forward”, “going backward” etc. these kind of functionalities can be written once and all those hosted control where in it is required needs to be added to the that toolbar.

Now once we have done all these steps, we can go ahead and launch Unified Service Desk. We should be able to see the Schedule toolbar button in the service calendar hosted control as shown below:

8

 

On click of “Schedule” button, it loads the dialog to Service Activity with out of the box dialog to book an appointment for the customer with an executive in a specific site, date and time as shown below:

9

This blog post covers scenarios for people who needs to use out of the box CRM service scheduling functionality in USD and those who have to create toolbar button or generic toolbar buttons for hosted controls.

I hope this helps.

%d bloggers like this: