Thursday, January 17, 2019

Dynamics 365 CE OnPrem: Enable Language: Violation of PRIMARY KEY constraint 'cndx_PrimaryKey_Report'. Cannot insert duplicate key in object 'dbo.ReportBase'

I have experienced an issue (Duplicate Record) while enabling language in Dynamics 365 Customer Engagement V9 OnPrem Organization (Vanilla).

The Log file showed error Violation of PRIMARY KEY constraint 'cndx_PrimaryKey_Report'. Cannot insert duplicate key in object 'dbo.ReportBase'
Error msg:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Cannot insert duplicate key exception when executing non-query: System.Data.SqlClient.SqlCommand Exception: System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'cndx_PrimaryKey_Report'. Cannot insert duplicate key in object 'dbo.ReportBase'. The duplicate key value is (5c4369e7-3c1a-e911-b800-00155d43e6ac, 0, Jan 17 2019 9:47AM).

I tried find the solution into Dynamics community; I identified that its being causing by known issues in Dynamics 365 CE V and will be resolved in upcoming Microsoft release. 

After digging further into forum details i found a resolution in CRM Patch "CRM9.0-Server-KB4458112-ENU-Amd64", (not officially announced yet).

After applying the KB4458112 (V, I was able to enable the language and it worked fine. 

I will recommend to install the patch on Dev/Test Dynamics 365 Onprem instance before the production deployment. 

Thumbs up if it works for you. 

Happy Dynamics 365 CE!!!!


Tuesday, November 6, 2018

Dynamics 365 CRM Version 9.0 OnPrem Installation Experience

Microsoft Windows Server 2016 & SQL Server 2016 with Service Pack 2 are the primarily prerequisites to install and configure Dynamics 365 CRM Version 9.0. it should work fine if all prerequisites are met.

But if you want to try Dynamics 365 V9 with SQL Server 2017, then there will be an issue happened where no SSRS instance identifies at the time of SSRS connector installation. The similar case happens in upgrading CRM 2016 version to Dynamics 365 8.2 in SQL Server 2017. 

This issue revolves around SQL Server 2017 where SSRS 2017 is yet to be supported in Dynamics 365 Version 9.0 OnPrem.

In the meanwhile SQL Server 2016 SP2 SSRS could resolve the installation and configuration issue. 

Hopefully Dynamics 365 future service updates shall have the fixes for SQL Server 2017. 😊

Happy Dynamics 365 Journey!!

Thursday, March 22, 2018

Waiting for a page to be retrieved from a CRM Server - Dynamics Outlook Connector -

There was some complains from business users in accessing their CRM Organization through MS Outlook Client. It was started happening after the installation of MS Outlook Connector

This issue was resolved after following the instruction written in Microsoft Support link:

Hopefully It will help for other to resolve the similar issue.


Outlook Connectivity Issue with Microsoft Dynamics 365 Server

One of our customer had experienced an issue in Microsoft Outlook while connecting for Microsoft Dynamics 365.

Metadata contains a reference that cannot be resolved: ''. at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(Uri address, MetadataExchangeClientMode mode)
at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpointMetadata(Type contractType, Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceConfiguration..ctor(Uri serviceUri, Boolean enableProxyTypes, Assembly assembly)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri, Boolean enableProxyTypes, Assembly assembly)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory`1.DiscoverAuthUsingServiceMetadata(Uri endPoint, Uri webEndPoint)
at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory`1.GetAuthProviderForDeployment(Uri endPoint, Uri webEndPoint)
at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo`1.GetAuthenticatedProvider(OrganizationDetail orgDetail, Control parentWindow)
at Microsoft.Crm.Application.Outlook.Config.ServerForm.LoadDataToServerInfo()
at Microsoft.Crm.Application.Outlook.Config.ServerForm.<InitializeBackgroundWorkers>b__3(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument) 

The issue was resolved after following the instructions mentioned on Microsoft Support link:

Hopefully It will help for other to resolve the similar issue.


Tuesday, April 5, 2016

Outlook Ribbon – Missing after the installation Dynamics CRM 2016 plug-in

I installed the CRM 2016 outlook client, and found same error which I faced with CRM 2013 on Windows 8.2 with Office 2010 long time ago. Now this issue came from Office 2013 with Dynamics CRM 2016 Online. 

I thought to keep save with my post for future reference.

There is an official Microsoft KB article explaining a registry update that should take care of the issue. The trouble for me was that I didn’t have the’ 2.4’ folder as specified in the KB.

I checked MS office registry references, those are not in use. You will find multiple folders in this particular registry path, I saw 2.6 and 2.7 for Office 2013 (these are also okay for Office 2016) and 2.8 for Office 2016. I don’t have office 2016 installed on my machine and folder was empty. So I deleted the 2.8 folder and restarted outlook. That worked for me.

The KB should probably need to be updated as this is outdated with recent releases. 

Office 2013, Dynamics CRM 2016 Online, Windows 10 Professional

Tuesday, August 25, 2015

Mail address are not synchronizing in SharePoint 2013

I have SharePoint 2013 configured in an environment that does not have a mail server on premise. I could not generate emails from SharePoint.

This was caused due to the User Profile Service Application was trying to sync the Work Email with the AD attribute ‘ProxyAddresses’.

The attribute ‘proxyAddresses’ is normally filled with information given by for example Exchange. The attribute is not set because we don’t have these kind of servers.

Configure the user properties import for Work Email:

  • First check if the User Profile Sync Service has started
  • Go to the User Profile Service Application
  • Open ‘Manage User Properties’ and navigate to Work Email
  • Remove the Synchronizing mapped field “proxyAddresses” and add new mapping of field “mail”

Start a full sync after changing this setting and the mail addresses will be filled in for users.


Tuesday, August 18, 2015

Microsoft Dynamics CRM 2013 “Data Encryption Feature Isn’t Activated” error when upgrading from Dynamics CRM 2011

Yesterday I came across with one issue after we did upgrade of Dynamics CRM 2011 to Dynamics CRM 2013 Service Pack 1.  Email routines stopped working as Data Encryption feature was not active.

We encountered first issue to open Data Encryption window from Data Management.

As we had on premise implementation and didn’t have SSL. To avoid SSL check in Dynamics CRM we executed the below steps.

  • Open SQL Server Management Studio.
  • Click New Query and select MSCRM_CONFIG database.
  • Run the command  
  •  UPDATE DeploymentProperties SET BitColumn = 1 WHERE ColumnName = ‘DisableSSLCheckForEncryption’

After we tried to activate Data Encryption but it generated error “Encryption key was not activated”.  “Data Encryption can’t be activated because the encryption key doesn’t match the source encryption key used to encrypt the data.”

We found CRM users & Queues password were saved in Dynamics CRM 2011 and Dynamics CRM has requirement to activate Data Encryption to save such details.

Once it was done we executed following SQL scripts in CRM Organization database. 

       update EmailServerProfile set IncomingPassword = null
       update EmailServerProfile set OutgoingPassword = null
       update Mailbox set Password = null
       update Queue set EmailPassword = null
       update UserSettings set EmailPassword = null

We were able generate Data Encryption key after performing all of the above steps. 

Hopefully it shall be helpful for others as well. Cheers!