Q: How do I control the visibility of BDC type descriptors in the External Item Picker control with the ShowInPicker property?

Q: How do I control the visibility of BDC type descriptors in the External Item Picker control with the ShowInPicker property?

By Tomek Stojecki

Problem: You have created associations between entities in the BDC Model using Visual Studio 2010. In the UI, the External Item Picker control shows all the type descriptors of the associated entity that are part of the return type. You want to hide some of the type descriptors that appear in the item picker, such as identifiers that might not contain user-friendly information.

Solution: In the BDC model, you can control the visibility of the type descriptor as it pertains to the Entity Item Picker, through the ShowInPicker property. Although on the surface it might seem like it would be a matter of setting it to true or false for individual type descriptors, doing that might not always be enough to see the expected behavior.

Unfortunately there is little to no documentation we could find that describes this peculiar behavior. The following list outlines some of the characteristics of working with the ShowInPicker property:

1.       The properties of the BDC Model are case sensitive. Make sure you use the proper case in all parts of the property definition.

2.       Define the property on the type descriptors that make up the return type of the Finder method. The default name for the finder method is ReadList.

3.       If the BDC Model has been previously deployed, delete the external content type before deploying the updated version. You can delete the external content type in Central Administration or in SharePoint Designer 2010. You don’t have to delete the external list associated with the content type to see the changes.

4.       You need to define at least one type descriptor with the ShowInPicker property set to true to be able to hide the remaining type descriptors that are part of the same return type. This implementation detail is particularly easy to omit as it isn’t well documented (if at all) nor is it intuitive.

Once you have a type descriptor with the ShowInPicker set to true (see Figure 1), you can hide the remaining ones by specifying the same property with the value of false, or not specifying the property at all. For example, if you start with a new Finder method where the return type comprises a number of type descriptors, in the External Item Picker you will see all of the type descriptors by default.

Simply specifying ShowInPicker with the value of false is not enough to exclude the type descriptor from the display. Instead, you must specify ShowInPicker with the value of true on at least one other type descriptor that is part of the same return type.

Read more SharePoint Q & A's :

SharePoint Q&A: Attempting to Configure Search Scope Settings for a Site Collection Throws an Error

SharePoint Q&A: How do I configure a load balancer to accept only SSL requests for a SharePoint 2010 FQDNs?

SharePoint Q&A: How Do I Apply a Filter Based on a URL to an External List?

SharePoint Q &A: How Do I Propagate BDC Model Updates to an Entity Picker to Resolve the "Parameter is Missing" Error?

 

SharePoint Q&A: How Do I Smoothly Deploy Reports Hosted in SharePoint?

Sharepoint Q&A: How Can I Create an External List When SharePoint Throws an Unspecfied ASP.NET Error?

SharePoint Q &A: InfoPath Designer 2010 message says By default this control will send data to the server whenever its value changes

SharePoint Q&A: How do I display a user-friendly value?

SharePoint Q&A: How do I display a more user-friendly error message?

SharePoint Q&A: How do I submit the InfoPath 2010 form programmatically to an external list?

Sharepoint Q&A: How Can I Create an Action for an External Content Type in SharePoint?

Sharepoint Q&A: How to Make a Type String Type Descriptor a Required Field in the BDC Explorer

Sharepoint Q&A: Data Source Conflict

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish