Q: I received the error "Failure Loading Item Picker" in the SharePoint ULS log. What do I do?
The underlying SharePoint BDC code didn't catch this and the error message isn't exactly specific. What should you do?
Problem: You are developing a BCS .NET Connectivity Solution in Visual Studio 2010. You add a filter descriptor to your entity and deploy the solution.
However, displaying the item picker data fails. In the SharePoint Unified Logging Service (ULS) log, you see this error message:
Failure loading item picker. System.Runtime.Serialization.SerializationException: Attempting to deserialize an empty stream. at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at Microsoft.SharePoint.WebControls.ItemPicker.get_ExtendedData() at Microsoft.SharePoint.WebControls.ItemPicker.get_EntityNamespace(); at Microsoft.SharePoint.WebControls.ItemPicker.OnLoad(EventArgs e)
Unfortunately, the ULS error message won't steer you in the right direction. This is a classic example of the underlying out-of-the-box Business Data Connectivity (BDC) service code not catching this error condition early enough, and then sending you an ambiguous message.
Possible Reason: You didn't add the filter descriptor to a Finder method (typically called ReadList) as an input parameter to the method in the associated service class.
Solution: After adding the filter descriptor name as an input parameter to the Finder method, be sure to delete the associated external content type from Central Administration before redeploying the model. In addition, verify that the method contains a Where clause to accommodate the filter descriptor.
For example, let's say you have an Entity named Car with an associated service class named CarService. You have defined a filter descriptor named ColorFilterDescriptor so that users can filter cars by color. This filter descriptor is associated with the color type descriptor in the Car entity. The color type descriptor is defined as an In parameter in the model. In the ReadList method of the CarService class, you must add the Color In parameter of the Car entity as an input parameter of the Finder (ReadList) method. In addition, you must add a Where clause to your ReadList method that will filter the value a user passes in for the ColorFilterDescriptor.
Read more SharePoint Q & A's : Q: Control the Visibility of BDC type descriptors?
Q: Attempting to Configure Search Scope Settings for a Site Collection Throws an Error?
Q: How do I configure a load balancer to accept only SSL requests for a SharePoint 2010 FQDNs?
Q: How Do I Apply a Filter Based on a URL to an External List?
Q: How Do I Propagate BDC Model Updates to an Entity Picker to Resolve the "Parameter is Missing" Error?
Q: How Do I Smoothly Deploy Reports Hosted in SharePoint?
Q: How Can I Create an External List When SharePoint Throws an Unspecfied ASP.NET Error?
Q: InfoPath Designer 2010 message says By default this control will send data to the server whenever its value changes
Q: How do I display a user-friendly value?
Q: How do I display a more user-friendly error message?
Q: How do I submit the InfoPath 2010 form programmatically to an external list?
Q: How Can I Create an Action for an External Content Type in SharePoint?
Q: How to Make a Type String Type Descriptor a Required Field in the BDC Explorer
Q: Data Source Conflict
About the Authors
You May Also Like