Error when creating a Connection – ‘ownerid cannot be null’

I had a DTS that created Connection records in CRM2011.

One of the data links was setting the owner of the connection.

Upon running the DTS, I received:

‘ownerid cannot be null’

And the error report shows:

The problem is in the file DynamicsCRMAdapter2011Metadata.xml, which can be found in the Scribe installation directory (normally C:\Program Files (x86)\Scribe). The file that ships with the Scribe installation is missing a row. It needs:

<BusinessEntityTableMetadata TableName="connection" SupportsOwned="true" 

The important parts are the SupportsOwned and SupportsSetState attributes. These are required in order that Scribe can change the ownership or set the state of the Connection record.

After you update the metadata file, it’s necessary to refresh Scribe’s metadata cache. This is stored in the ScribeInternal database, in the Scribe.AdapterMetadata table.

The SQL to delete the cached data, and force Scribe to reload from the modified XML file is as follows:

 where NAME='DynamicsCrm 2011 Adapter'

Scribe Certified Partner
Scribe MVP

%d bloggers like this: