Q: How Do I Make a Type String Type Descriptor a Required Field in the BDC Explorer
Make a type descriptor of type string a required field? Yes, it's not difficult.
By Tomek Stojecki, Stefan Kowalewski, and Ethan Wilansky
Problem: You have a type descriptor of type string and you want to make it a required field in a Visual Studio 2010 Business Data Connectivity (BDC) app definition.
By default, the nullability of a type descriptors’ underlying data type determines whether the field is required or not in an auto-generated list form tied into an external list. Because the System.String type is nullable in .NET, the type descriptors of type string result in non-required fields on the forms, even though the LOB system might require a value for it.
Solution: To make a type descriptor of type string a required field in the BDC Explorer, select the type descriptor and in the Properties window, under General, click the Custom Properties field.
This displays the Property Editor modal window. Enter the following values into the respective columns:
Name | RequiredInForms |
Type | System.Boolean |
Value | true |
Keep in mind these important tips:
1. Because the Value field is a multiline field, if you enter text into the Value field last and hit Enter, the OK button doesn’t become enabled, which prevents you from completing this operation.
To enable the OK button, set a cursor back into the Name field after all the values have been entered, then hit Enter, or enter the values in a reverse order, where the Value field isn’t set last.
2. The Boolean values are case sensitive. Enter the value of true or false (all lowercase); otherwise you will receive a parser error when compiling the project.
See all the SharePoint Q&As:
Sharepoint Q&A: How Can I Create an External List When SharePoint Throws an Unspecfied ASP.NET Error?
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
About the Authors
You May Also Like