BCS Item Picker foreign key Column Name in SharePoint External List

We have been asked several times how you can change the BCS item picker column name for foreign keys when editing or creating a new item in an External List.

For example you have created the following model as described here BCS item picker for Foreign Key in SharePoint External List.

BCS Model with association

We have an association here between the REGION_ID which is a column in both tables. Let’s deploy this model straight away and create a new External List from the COUNTRIES External Content Type. Now we go to edit the item in order to take a look how the BCS item picker column name is displayed.

Not Good-Looking BCS Item Picker Column Name

This name BCSMetaMan1.REGIONS doesn’t look friendly. Luckily there is a way we can get SharePoint to use the name as we want. In order to assign a new name we should add DefaultDisplayName attribute to the REGIONS External Content Type in the bcsmm file (Business Data Connectivity Model File). To edit the file you can right click on the *.bcsmm file in Visual Studio and choose to open in XML view. The following is that changes we need to make (don’t forget to increment the version number):

Original:

<Entity Name=REGIONS Namespace=BCSMetaMan1 Version=1.0.0.0>

Updated:

<Entity Name=REGIONS Namespace=BCSMetaMan1 DefaultDisplayName=Regions available to use Version=1.0.0.1>

Deploy the model and you will now be able to see friendlier than before BCS item picker column name.

Friendly BCS Item Picker Column Name

If you have any questions feel free to email them to support@lightningtools.com

<Dmitry Kaloshin/>

Leave a comment