4

After installing commerce server I tried to authenticate on my local site and got the following message:

The requested profile could not be retrieved because the key name provided does not exist or is not an indexed property. The profile type is 'UserObject'. The key name provided is 'GeneralInfo.ExternalID'.

I have run the deployment of the ProfileDatabase.dacpac with a successfully deployed message as per the guideline I ran into this blog post and tried it but it did not work. The interesting thing is that the profiles database did have the u_external_id property on the table UserObject. However, if I open the commerce server manager and browse to the data sources and profile definitions, the external id property was not there as the post suggests. I added it but it didn't work.

Anyone know what I'm missing?

2

2 Answers 2

1

Try this:

Verify that profile schema is correct. If profile schema is incorrect then import profile schema again.

After importing schema, modify Sitecore Commerce 8.0 powered by Commerce Server Profile Schema for Sitecore Integration as described here.

I have found that profile database schema was not correct and u_external_id column was missing in UserObject table of profile database.

Make the following changes in UserObject table of profile database:

Add column: u_external_id NVARCHAR(256) NOT NULL

IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'userobject' AND COLUMN_NAME = 'u_external_id')
BEGIN
 ALTER TABLE dbo.UserObject ADD u_external_id nvarchar(256) NOT NULL
END
GO

Create Index on: u_external_id, UNIQUE NONCLUSTERED INDEX and ASC

IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[UserObject]') AND name = N'IX_UserObject_ExternalId')
 DROP INDEX [IX_UserObject_ExternalId] ON [dbo].[UserObject]
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[UserObject]') AND name = N'IX_UserObject_ExternalId')
CREATE UNIQUE NONCLUSTERED INDEX [IX_UserObject_ExternalId] ON [dbo].[UserObject]
(
 [u_external_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

Update Sitecore Commerce 8.0 powered by Commerce Server Profile Schema. Add a new GeneralInfo.ExternalId profile property that maps to the external id column, it must be required and unique.

Refresh the cache and reload the register account page. You should no longer get the above error message and should be able to create new user account in demo storefront website.

1
  • hey Gustavo I tried that as I mentioned on the question with that blog post but it didnt work. its pretty much the same suggestion isn`t it?
    – Diego
    Commented Mar 7, 2017 at 13:17
0

The issue was related to the execution of the InitializeCSSite powershell command which failed to import the profile.

To address this issue I had to import the profile.xml schema manually following the instructions on this link. The profile schema can be found at the website's root under the path: Website\SitecoreCommerce\Data\Profiles\Profiles.xml

In case you are wondering this xml file is part of the Storefront package installation so you should have it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.