Lightning Tools Blog

SharePoint Tools, Web Parts and Discussions

The TypeDescriptors incompletely define where the Identifiers of Entity ‘X’ are to be read–BCS Error

We are going to investigate the following Issue in this blog post

There is an error in the TypeDescriptors of Parameters on Method with Name 'GetAllSupercars' on Entity (External Content Type) with Name 'Supercar' in Namespace 'LightningTools.TheTestBcsModel.BdcModel1'. The TypeDescriptors incompletely define where the Identifiers of Entity 'Supercar' are to be read. That Entity expects exactly '1' Identifiers, but only '0' TypeDescriptors were found from which to read them.   

OK, lets have a look at this error then. We can see that we have an issue with our TypeDescriptors, if we have a look in the BDC Explorer we can see our TypeDescriptors under the GetAllSupercars method, so somewhere here is where our problem lies

BDC Explorer - Showing TypeDescriptors

The error also mentions that

That Entity expects exactly '1' Identifiers, but only '0' TypeDescriptors were found from which to read them

If we have a look at the External Content Type in Visual Studio we can see that we have an Identifier defined

Supercar External Content Type

The thing to remember is that when we have an Identifier defined each method needs to return that identifier if it’s returning data. If we look though at our TypeDescriptors we can see that we ARE returning CarId, so why is SharePoint complaining at us?

Well…. I’ll tell you why, it’s because SharePoint does not know that CarId is the Identifier, it might have the same name but that doesn’t matter, we need to tell SharePoint which of our TypeDescriptors is the Identifier. If SharePoint EXPECTS exactly 1 identifier then we will give it one identifier, this is done by the following.

Select the ‘CarId’ TypeDescriptor from the BDC Explorer, make sure the properties window is turned on (press F4 if it isn’t). Now lets have a look at those properties.

We can see there is a property for Identifier, and there is a drop down. If we click on the Drop Down we can choose that this ‘CarId’ TypeDescriptor is the expected ‘CarId’ Identifier!

TypeDescriptor Properties Tool Window

So we have done this
TypeDescriptor Properties Updating Identifier

Let’s try and deploy again (I think I know what’s going to happen, do you?)

External Content Type Data in Business Data Web Part

So there we are, we have fixed the error!

<Phill />

Tired of getting BCS errors? Why not try... BCS Meta Man

BCS Meta Man provides the ease of use of a drag and drop interface with the power of Visual Studio. It can save you days in time by generating the code required by SharePoint 2010 to read and write back to your External Systems.

Click here to get an email when we update our blog

Print | posted on Friday, January 21, 2011 10:33 AM

Feedback

# re: The TypeDescriptors incompletely define where the Identifiers of Entity ‘X’ are to be read–BCS Error

left by Pyg at 1/27/2011 8:18 PM Gravatar
Thanks - good post. It sorted my problem.
A related issue I had and was unable to resolve was when I was trying to pick up sql credentials from sharepoint secure store and insert them into the filterdescriptors and pick them up to connect to a sql database. Unfortunately I kept getting an error in the browser when trying to open the content type along the lines of SecondarySSsApplicationID property could not be found in lobsysteminstance ... or some such. I had defined these in the LobSystemInstances custom properties collection as instructed in msdn but had to revert back to a straight connection string to get it to work.
Anyway... thanks again

# re: The TypeDescriptors incompletely define where the Identifiers of Entity ‘X’ are to be read–BCS Error

left by Phill at 1/28/2011 11:15 AM Gravatar
Hi Pyg,

I am glad you found the post useful, We have done quite some work on using the Secure Store for BCS Meta Man. It might be an idea for you to give BCS Meta Man a go and see how it works with the Secure Store.

Regards

Phill
Title  
Name
Email (never displayed)
Url
Comments   
Please add 4 and 4 and type the answer here: