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

Learn how to create an external content type in the Business Data Connectivity Model without using SharePoint Designer.

+1
Stefan Kowalewski, Ethan Wilanskyand 1 more

July 14, 2010

1 Min Read
ITPro Today logo

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:

Name of Action"Position="1"IsOpenedInNewWindow="true"Url
  ="NavigateToUrl.aspx?Id=\{0\}">

ParameterId"Index="0" />

 

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:

Name of Action

 

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

 

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like