By Stefan Kowalewski, Tomek Stojecki, and Ethan Wilansky
Q: How can I create an action for an external content type (ECT) in the Business Data Connectivity Model (BDCM) if I don't want to use SharePoint Designer?
A: Here's a possible solution: While you can add an Action to the ECT in Central Admin, another approach is to edit the XML in the BDCM. Add the following code to the Entity element of your BDCM:
<ActionName="Name of Action"Position="1"IsOpenedInNewWindow="true"Url
The name of the Action will be displayed as the text in the list of actions. You can also add as many parameters as necessary. Just be sure to assign a property to each parameter.
Add the following XML to the Properties element of your Entity to set the Action as default:
<PropertyName="DefaultAction"Type="System.String">Name of Action</Property>
Only one Action can be set as the default.
There are a couple items worth noting with this approach:
- Actions don’t appear in BDC Explorer in VS2010. In order to add or edit the Actions you have to open the BDCM in the XML editor or Notepad.
- If you update your Action in the BDCM, delete the ECT from Central Admin before deploying it. You may also need to delete and re-add the list before the Actions are available on the list.
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