Author Archives: danielbergsten

Dynamics 365 On-Premise with IFD and Microsoft.XRM.Client

After upgrade from Dynamcis CRM 2016 v 8.1.1 to Dynamics 365 v 8.2.1 our integrations using Microsoft.XRM.Client stopped working, now throwing:

System.ServiceModel.Security.SecurityAccessDeniedException occurred
Message=Access is denied.

First I replaced the Microsoft.XRM.Sdk.dll with the latest from the D365 SDK but still same error.

The solution/fix was to add the organization name to the connectionstring URL:

Changing from https://orgname.domain.se to https://orgname.domain.se/orgname resolved the issue

<add name=”MyCRMConnection” connectionString=”Url=https://orgname.domain.se/orgname; Username=user@domain.se; Password=Secret; authtype=IFD” />

Advertisements

PowerShell issue Dynamics CRM & 365 IFD

I was trying to onfigure a Dynamics 365 server to enable federated claims.

$ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
$ClaimsSettings.Enabled = $true
Set-CrmSetting -Setting $ClaimsSettings

But got this error>

Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> Add-PSSnapin Microsoft.Crm.PowerShell
PS C:\Windows\system32> $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
Get-CrmSetting : The underlying connection was closed: An unexpected error occurred on a send.
At line:1 char:19
+ $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Crm.P…rmSettingCmdlet:GetCrmSettingCmdlet) [Get-CrmSetting
], WebException
+ FullyQualifiedErrorId : CRM Deployment Cmdlet Error,Microsoft.Crm.PowerShell.GetCrmSettingCmdlet

The solution was to fix the Web Address properties of the CRM server in CRM Deployment Manager. These Web Addresses were not the same as the address of our IFD deployment.

I found the solution here: http://rickardnorstrom.blogspot.se/2013/02/ (Thanks!)

Dynamics Connector with CRM 2016 problem resolved!

We were running Microsoft Dynamics NAV 2015, Dynamics CRM 2015 and Dynamics Connector – working fine!

But when we upgraded to CRM 2016 the Dynamics Connector stopped working with these errors below.

Connector Log

Metadata contains a reference that cannot be resolved:

Event Log

Inner Exception: [System.Xml.XmlException] The maximum nametable character count quota (16384) has been exceeded while reading XML data. The nametable is a data structure used to store strings encountered during XML processing – long XML documents with non-repeating element names, attribute names and attribute values may trigger this quota. This quota may be increased by changing the MaxNameTableCharCount property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 1330.

Solution

The solution was to replace these DLL’s in the Dynamics Connector program files directory with the new files from CRM 2016 SDK.

  • Microsoft.Crm.Sdk.Proxy.dll
  • Microsoft.Xrm.Sdk.dll

 

 

ISSUE:

On your Dynamics CRM 2016, organization (crmnolia) , when try to integrate it with Microsoft Dynamics NAV 2015 using Connector Version (3.4.304.1) , during the configuration you have the following error :  Metadata contains a reference that cannot be resolved: ‘https://crmnolia.umea.se/Nolia/XRMServices/2011/Organization.svc?wsdl=wsdl0&#8217;.

 CAUSE:

Problem with the following dlll “Microsoft.Xrm.Sdk.dll”.

RESOLUTION:

1. Closed Connector

2. Stopped Connector Service

3. Downloaded “Microsoft Dynamics CRM 2015 Software Development Kit (SDK)”

4. Backed up file “Microsoft.Xrm.Sdk.dll” from “C:\Program Files (x86)\Microsoft Dynamics\Microsoft Dynamics Adapter\Adapters\Microsoft.Dynamics.Integration.Adapters.Crm2011\” folder

5. Replaced “Microsoft.Xrm.Sdk.dll” file in Dynamics Adapter folder with the one from the 2015 SDK Bin folder (Original file version: 7.0.0.516; New file version: 7.1.0.1085)

6. Started Connector Service

 

Dynamics CRM Outlook Client Invalid OrganizationId

Re-post from http://quantusdynamics.blogspot.se/2012/03/dynamics-crm-2011-outlook-client.html?showComment=1440595982105#c8457841292289090860. Thank you, Nuno Costa!

———————–

Dynamics CRM 2011 Outlook Client Invalid OrganizationId

I suddenly found myself unable to configure any Dynamics CRM 2011 Outlook client, receiving the following error:

>Failed to refresh entry. Exception Microsoft.Crm.Application.SMWrappers.InvalidOrganizationIdException: Invalid OrganizationId “xxxxx566-5xxx-e1xx-adxx-xxxx56af0xxx”.
at Microsoft.Crm.Application.SMWrappers.ClientOrganizationContextFactory.Get(Guid organizationId)
at Microsoft.Crm.Application.SMWrappers.ClientOrganizationContextFactory.Microsoft.Crm.IOrganizationContextFactory.GetOrganizationContext(Guid organizationId)
at Microsoft.Crm.Caching.CrmMultiOrgCache`2.RefreshClientEntryCallback(String key)
at Microsoft.Crm.ClientCrmCache`1.RefreshEntryWaitCallback(Object keyString)

It seems this happened after enabling SPN’s to work with the CRM 2011 FetchXml reports. The resolution is to enable IIS to authenticate using the AppPool Account credentials.

Resolution
In IIS highlight the CRM website and open the Configuration Editor

Navigate to:
system.webServer > security > authentication > windowsAuthentication

Set useAppPoolCredentials to True

Use the Diagnostics Trace from CRM Outlook client to read log mentioned. Also this error is found in configuration log:

10:54:58|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.OutlookConfigurator.InitializeMapiStoreForFirstTime
10:57:44|  Error| Exception : An error has occurred. Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization’s Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support.    at Microsoft.Crm.MapiStore.DataStore.WaitInitialized()
at Microsoft.Crm.Application.Outlook.Config.OutlookConfigurator.InitializeMapiStoreForFirstTime()
at Microsoft.Crm.Application.Outlook.Config.OutlookConfigurator.Configure(IProgressEventHandler progressEventHandler)
at Microsoft.Crm.Application.Outlook.Config.ConfigEngine.Configure(Object stateInfo)
10:57:44|  Error| Exception : Server was unable to process request.

———————–

Dynamics CRM 2011 Outlook Client Invalid OrganizationId

I suddenly found myself unable to configure any Dynamics CRM 2011 Outlook client, receiving the following error:

>Failed to refresh entry. Exception Microsoft.Crm.Application.SMWrappers.InvalidOrganizationIdException: Invalid OrganizationId “xxxxx566-5xxx-e1xx-adxx-xxxx56af0xxx”.
at Microsoft.Crm.Application.SMWrappers.ClientOrganizationContextFactory.Get(Guid organizationId)
at Microsoft.Crm.Application.SMWrappers.ClientOrganizationContextFactory.Microsoft.Crm.IOrganizationContextFactory.GetOrganizationContext(Guid organizationId)
at Microsoft.Crm.Caching.CrmMultiOrgCache`2.RefreshClientEntryCallback(String key)
at Microsoft.Crm.ClientCrmCache`1.RefreshEntryWaitCallback(Object keyString)

It seems this happened after enabling SPN’s to work with the CRM 2011 FetchXml reports. The resolution is to enable IIS to authenticate using the AppPool Account credentials.

Resolution
In IIS highlight the CRM website and open the Configuration Editor

Navigate to:
system.webServer > security > authentication > windowsAuthentication

Set useAppPoolCredentials to True

Dynamics Connector Submit Button on Account Contact not working

I configured the Dynamics Connector for CRM 2015 and NAV. When testing the Account mapping I clicked the Submit button on the account form. Nothing happend! After a couple of hours I realized that the Javascript function behind the button checked for ReadyForIntegration = false. But in my case the account already created were ReadyForIntegration = null. New accounts were given a default value of false.

Simply changing the value to false instead of null allowed the Submit button to work. I also modified the Javascript to check for null as well as false.

Microsoft Dynamics Connector for CRM 2015 and NAV – Product Bundles

Be aware that Product Bundles introduced in CRM 2015 is not supported by the Dynamics Connector.

When using required bundle Products, CRM business process throws an exception on Submit Order. With optinal bundle Products the order gets submitted but error occurs in the Connector (LineIntegrationID null).

I have created a case with MS support. Will update this post if problem is solved.

Microsoft Dynamics CRM: how to create new view for order/invoice/opportunity products entity

If you want to add/create a new view for any of the Opportunity Products, Order Products or Invoice Products entities, you will find there is no button to create a new view.

Still it is possible to create new views. Just open the existing default view “All Order Products” and then click Save As…

WARNING! Don’t do this as it will cause other problems: http://community.dynamics.com/crm/f/117/t/117274