Very recently I was helping a business acquaintance of mine with their existing CRM Online implementation and I ran into a rather peculiar problem. I will describe the scenario first, then the error we faced and finally possible solution/workaround.
If your case does not fall in the scenario described here, there can be n number of reasons you are getting this error and you should start digging deep in traces logs or engage your CRM Administrator and/or Microsoft Support.
The client had multiple environments (Dev, Testing, Staging and Prod) which were cloned from 1 root environment and over the period of time they went out of sync (It is quite common to be these environments out of sync in terms of data as well as customization)
– however it was not tracked when they went out of sync. Now comes the strange part. There were certain records which needed to be migrated between two environments. I suggested we use standard import/export feature of Dynamics CRM. It should have worked but it did not.
We tried a lot but the files never went through and it never showed us any error. We gave up and as there were just 70 odd records, I whipped up a small utility that will take these records from source and push them to target. All set right? Well… NO.
Error and Troubleshooting:
I started getting error: Cannot insert duplicate key. I was surprised as the possible duplicate records were indeed not present in other environment. Dedupe rules were all disabled. Alternate keys were not defined. I disabled Activity Feed rules as well. Still no results.
As a last resort, I removed all the unnecessary attributes (which included some relationships) and taadaa… it all went in… except 1 record. After careful evaluation of both the environments I found that another record with the same GUID was already present (As I cloned records from other environment GUIDs were same).
So there were multiple reasons I was getting these errors in this scenario
- I had relationship attributes cloned, which retained GUIDs
- 1 record already had a duplicate record in the target environment. – As the environments were cloned their GUID seeds were same in each organization.
A possible solution here is to remove relationship data while you are cloning records and re-establish them after the records are created and also do a cleanup of record ID so you don't run in to the second case.
I am very pleased to present new years' gift (although I am 10 days off of the mark ;)) from all of us at CrmXpress. As by the post's title you would have guessed, this is a theme editor for Dynamics CRM 2016.
The new theme editing features of Dynamics CRM 2016 is one of the well-received feature since 2015 update 1. Only challenge with the current editor is, you have to entre HEX values manually which can be problematic for non-technical users.
It is simple and straight forward to use. Still someone might find it useful so here is quick guide demonstrating how to use CrmXpress Theme Editor.
- Download the solution from here.
- Import the solution in your organization and publish it.
Now, open the solution and you will see the screen below:
Figure 1 Configuration Page
Click on Edit against the theme you want to edit and you will be presented with the editor.
Figure 2 Theme Editor
Make desired changes and click on submit.
Figure 3 Theme Editor - Color Picker
Figure 4 Save the changes by clicking Submit
As theme editing in CRM is a new feature and we have external dependencies, this release is a Beta release. Please provide your valuable feedback/bugs/feature requests to help us improve and stabilize Theme Editor.
Microsoft is adhering to the cloud first strategy for Dynamics CRM. There has been an increased time gap to when the CRM On-Premises customers receive the new features (or even bug fixes) as compared to the CRM Online customers. There are also features like Office 365 integration, Social apps etc., which are better suited for CRM Online users. This has triggered an interest among the CRM On-Premises customers to migrate to CRM Online. There could also be a number of other reasons like reduced infrastructure cost, maintenance etc. Moving to CRM Online isn’t just a database restore as Microsoft will not support that. Instead, the Solution files must be imported and the data has to be migrated. Here are a few things to plan for
- License: Licensing is different for CRM Online and On-Premise. A Microsoft partner can help you get the required licenses. Ideally, licenses (cost) should also be a factor in making the migration decision.
- Customizations: Import any managed solutions that you may have into CRM Online. Then import the unmanaged solution from the On-Premise version.
- Data Migration: Depending on the amount of data and the complexity of the data structure, you can choose from Import wizard, SSIS based migration (Kingswaysoft), or use third party tools is Scribe/ Synchronicity Echo. This step is the complex one of all. In that, fields like system fields ( like ModifiedOn, ModifiedBy, ActualClose, ActualStart etc.), have to be taken care of, record status (especially activities) might have to be set, multiple currencies and exchange rates have to be managed, plugins/workflows might have to be disabled during the data migration.
It is also worth noting that, if you are upgrading in addition to migration ( moving from an older version of CRM On-Premises to CRM Online), then an analysis of whether the features in new version can alleviate the existing customizations will be beneficial. This is also a good time to check on what exactly is being used/unused in the CRM implementation.
If for some reason, you decide to go back to CRM On-Premises, all you need is to request the support team for a database backup and restore it on the On-Premises instance. Here is a document that details the steps needed for migration. Keep in mind that you might not be seeing some of the features that were available on CRM Online but not yet released in the On-Premises version.