Secondary lookup columns for external content types not displaying data in list after refreshing from primary

1.5k views Asked by At

I have created a SharePoint list that has a lookup column to an external list. I also have instructed SharePoint to display several secondary columns that are related to that primary external lookup column in my list as well.

The problem is that after I programmatically add a new SPListItem to my list and set the SPLookupValue for the primary lookup field (which works fine) when I go to the list view in my SharePoint portal I see the value in the primary field but when I click the green "refresh data from external list" icon in the column header to load the data from the external list into the secondary fields I get the following message.

Refresh successful.

0 item(s) were refreshed.

0 item(s) could not be refreshed. Contact your system Administrator.

In addition, when I try to edit the SPListItem the value that displays in the primary external lookup column (which should be a valid value) I am greeting with the message displayed below the textbox that reads:

"No exact match was found. Click the item(s) that did not resolve for more options. You can also use Select button to choose External Data."

When I click on the icon to select the external data, I get the pop-up window/dialog that allows me to select items from the external list. All of the data displays properly. There are no errors. But when I actually select one of the rows and click "OK" I get the same red error message saying that "No exact match was found...".

I'm guessing that there is something wrong with my External Content Type, Bdc Model, Specific Finder method that is responsible for retrieving the data for a specific entity result but I'm just not sure how to identify exactly what is wrong.

1

There are 1 answers

0
Ami Schreiber On BEST ANSWER

OK. So I figured out the problem.

I had created Identifiers for ALL of my entity's properties instead of just creating identifiers for only the properties that makes the specific entity unique! I had created identifiers for properties that had null values and others that were of type DateTime that do not at all uniquely identify the entity. As a result, when trying to perform a refresh on the external list data, it was trying to retrieve the external data for each of the individual list items with the assumption that every single column/field in the external list was part of the unique identifier for a particular list item. Obviously that prevented the data from refreshing correctly.