0
Fixed

Incorrect Error Message on Schema Validation

Richard Courtenay 13 years ago in UNIFYBroker/Microsoft SharePoint updated by anonymous 9 years ago 6

On setting the RecordId attribute to a validator of any type other than "long", the below error message occurs. This field should be of type 'long', with the error messages suggestion of 'guid' being incorrect (and it will validate as an error if attempted).

Service cannot be started. Unify.Framework.UnifyServerInitializeException: SharePoint 2010 Organization Profile connector requires a single key of RecordId, which is expected to be of type Guid. ---> Unify.Communicators.SharePointConfigurationException: SharePoint 2010 Organization Profile connector requires a single key of RecordId, which is expected to be of type Guid.
   at Unify.Connectors.SharePoint2010OrganizationProfileConnector..ctor(Guid connectorId, IEntitySchema schema, String name, IConnectorGroup connectorGroup, IConnectorEntityPartitionContextFactory contextFactory, IGenericWCFCredentialsCommunicatorInformation communicatorInformation, Int32 pageSize, Int32 maxItemsInObjectGraph, Boolean replaceWideAmpersands)
   at Unify.Connectors.SharePoint2010OrganizationProfileConnectorFactory.CreateConnector(XElement communicatorElement, IGenericWCFCredentialsCommunicatorInformation communicatorInformation, Guid connectorId, IEntitySchema schema, String name, IConnectorGroup connectorGroup, IConnectorEntityPartitionContextFacto...

The below for example will trigger the error.

<entitySchema>
            <field name="UserProfileGUID" validator="guid" />
            <field name="AccountName" validator="dn" />
            <field name="RecordId" validator="string" key="true" readonly="true" />
            <field name="DisplayName" validator="string" />
			<field name="PreferredName" validator="string" required="True" />
            <field name="Members" validator="dn.multi" />
            <field name="ParentRecordId" validator="long" />
          </entitySchema>

correct value documented at https://unifysolutions.jira.com/wiki/display/IDBSP305/Microsoft+SharePoint+2010+Organization+Profile+Connector

I can't edit now, but this is for version 3.0.5

Hi Richard,

What type is returned when you use the SharePoint Configuration Wizard? This queries SharePoint for the type the schema field should be. If there is a mismatch here this is something that we'll need to look at.

Hi mat, from memory the configuration tool reads the attribute correctly, RecordId being of type long. I've tried to verify but my VMs are not atm in a state to test this. The only issue I believe is if you modify the RecordId to a different type, the schema validation error above gives a misleading recommendation to set it to type guid, which is incorrect and won't work.

Sorry, just realised this was still assigned to me. Don't believe any changes have been made.

Still a low priority issue

In v4.0 of the connector, fixed schemas are used to address this issue. Issue resolved.