0
Fixed

Identity Broker for CRM initial connector configuration issue

Ryan Crossingham 7 years ago in UNIFYBroker/Microsoft Dynamics CRM updated by anonymous 5 years ago 17

Currently can not read the CRM schema via CRM connector.

When attempting to pull down the CRM schema i receive the following error: Unable to load the embedded resource 'Unify.Service.Embedded.Microsoft.Xrm.Sdk.dll' from Unify.Service.Connect, Version=4.0.0.0, Culture=neutral, PublicKeyToken=84b9288cb2633de4:

HALP!



CRM1.png
CRM2.png
CRM3.png
CRMSchemaContact.xlsx
microsoft.crm.sdk.proxy.dll
microsoft.xrm.sdk.dll
Affected Versions:
Fixed by Version:

I have ensured that the CRM service account has the appropriate rights to CRM.
URI is available..

The service account is a domain account - I assume I should be using the "custom" credentials type, UNLESS the idB Service account has access to the CRM service?

Currently attempting to pull contact objects.
I need to confirm I don't require additional mandatory information in the connector config.

Is the Identity Broker machine different from the Microsoft Dynamics CRM 2011 machine? Considering the error message I'm guessing it is.

Please install the attached Microsoft dll's to the Identity Broker services directory and try again.

These assemblies shouldn't be deployed to production or kept just yet, as I'm not completely sure of the license terms (IDBMDCRM-7 to figure this out, as it may be allowed to include them in the installer).

Ok - that looks better than the error i was receiving.

Now something different:

Still, it’s progress. ☺

Other than this, things going OK?

jhb

From: Ryan Crossingham (JIRA) jira@unifysolutions.jira.com
Sent: April 30, 2013 1:12 AM
To: James Booth
Subject: JIRA (NZPPS-7) Identity Broker for CRM initial connector configuration issue

https://unifysolutions.jira.com/s/en_US6g3m5q-1988229788/6080/90/_/jira-logo-scaled.png

https://unifysolutions.jira.com/secure/useravatar?ownerId=ryan.crossingham&avatarId=11331Ryan Crossingham<https://unifysolutions.jira.com/secure/ViewProfile.jspa?name=ryan.crossingham> updated Product Group Support NZPPS-7<https://unifysolutions.jira.com/browse/NZPPS-7>
Identity Broker for CRM initial connector configuration issue<https://unifysolutions.jira.com/browse/NZPPS-7>

Change By:

Ryan Crossingham<https://unifysolutions.jira.com/secure/ViewProfile.jspa?name=ryan.crossingham> (30/Apr/13 3:11 PM)

Attachment:

CRM3.png

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Please see SUBIDBMDCRM:Downloads v4.0.0.2.

I believe the issue was that I had used a slightly incorrect request to get back the schema (http://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.metadata.entityfilters.aspx used Entity, but now using Attributes and Relationships).

Edit: Oh, and the actual error was because the response contains null values instead of an empty enumerable, of course!

OK - Schema provider returns the following for Contact: CRMSchemaContact.xlsx

If I apply the attribs listed in the attached excel the CRM connector page will lockup similar to an infiniate script loop. Adding the schema items individually seems to be fine. As discussed, this indicates that there's an attrib property that idB doesnt agree with =)

When attempting to import all (purely using the default "id" attrib) I recieve the following error:

    20130430,23:51:17,UNIFY Identity Broker,Change detection engine,Error,"Change detection engine import all items failed.
Change detection engine import all items for connector Dynamics CRM - Contacts failed with reason Value not found. Duration: 00:00:00.0180016
Error details:
Unify.Framework.Collections.GroupedNameValueCollectionMissingFieldException: Value not found
   at Unify.Framework.StoredValues.StoredValueCollection.GetValue[T](GroupedNameValueCollectionKey key)
   at Unify.Product.IdentityBroker.DynamicsCrmObjectConnector.GetAllEntities(IStoredValueCollection storedValueState)
   at Unify.Product.IdentityBroker.ConnectorToReadingConnectorBridge.GetAllEntities(IStoredValueCollection storedValueState)
   at Unify.Product.IdentityBroker.EventNotifierReadingConnectorDecoratorBase`1.GetAllEntities(IStoredValueCollection storedValues)
   at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.ImportAllChangeProcess()
   at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.RunBase()
   at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run()
   at Unify.Product.IdentityBroker.QueuedConnectorExecutionProcessorEndDecorator.Run()",Normal

v4.0.0.3 fixes the above error. It also splits up the schema providers. Could you try each and let me know which/any of them works?

Slight change in error - out of the range of valid values

20130501,05:29:44,UNIFY Identity Broker,Change detection engine,Error,"Change detection engine import all items failed.
Change detection engine import all items for connector testtttsss failed with reason Specified argument was out of the range of valid values.
Parameter name: field. Duration: 00:00:00.1090145

Error details:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: field
   at Unify.Framework.Collections.GroupedNameValueCollectionKey.op_Implicit(String field)
   at Unify.Product.IdentityBroker.DynamicsCrmObjectConnector.GetAllEntities(IStoredValueCollection storedValueState)
   at Unify.Product.IdentityBroker.ConnectorToReadingConnectorBridge.GetAllEntities(IStoredValueCollection storedValueState)
   at Unify.Product.IdentityBroker.EventNotifierReadingConnectorDecoratorBase`1.GetAllEntities(IStoredValueCollection storedValues)
   at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.ImportAllChangeProcess()
   at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.RunBase()
   at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run()
   at Unify.Product.IdentityBroker.QueuedConnectorExecutionProcessorEndDecorator.Run()",Normal

v4.0.0.4 fixes that one. Really sorry about this, bit tricky without a test system.

No worries at all mate - This is the best way to test without a test env handy.

When attempting to import all (purely using the default "id" attrib):

Change detection engine import all items for connector CRM failed with reason 'Contact' entity doesn't contain attribute with Name = 'Id'.. Duration: 00:00:02.9183725 

v4.0.0.5 fixed that issue. Was sending the id field through to Dynamics CRM when it's not a real attribute.

This version also used the SetStateRequest, which is required to set the state, I'm not sure where I read that it could be done like a regular field. You don't need to change anything to have this work.

Still receiving:

Change detection engine import all items for connector CRM failed with reason 'Contact' entity doesn't contain attribute with Name = 'Id'.. Duration: 00:00:02.9183725 

ID is still in the schema list by default aswell

Uploaded v4.0.0.6 that fixed that issue. Accidentally used the key for the sort during retrieve, so I've added a configuration option for this setting.

OK! Importing purely on ID with contactID set as SortField the I receive an ID back on the Import All =)

When attempting to manually add schema field names such as AccountID (GUID reference) and run Import all I receive the following:

20130506,05:37:34,UNIFY Identity Broker,Change detection engine,Error,"Change detection engine import all items failed.
Change detection engine import all items for connector DynamicsCRM - Contact Connector failed with reason Cannot specify child attributes in the columnset for Retrieve. Attribute: accountidname. Duration: 00:00:00.2280548
Error details:
System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Cannot specify child attributes in the columnset for Retrieve. Attribute: accountidname (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).",Normal

I tried adding other fields / field types with the same result.

Note: Still required to add the schema fields manually as the page locks up similar to a script loop as mentioned in the the comment above - This is not a priority right now as i can happily add fields manually. Just wanted to make sure it wasn't related.

v4.0.0.7 adds a new configuration option All Columns that makes the query run against Microsoft Dynamics CRM request all columns, instead of specifying each of the columns.

You're welcome to close this mate.
Happy to put this one to bed

Closed. Attached dll's included in installer, as permitted by IDBMDCRM-7.