How to: Add a Custom Action to an External List

Applies to: SharePoint Server 2010

Custom actions can be used to run a workflow, show an existing form, or navigate to another Web page.

Add a Custom Action

  1. Navigate to the external list in the browser.

  2. Click Edit List on the Server ribbon. This should open the external list in Microsoft SharePoint Designer 2010.

  3. Click the Custom Action button on the ribbon as shown in the following figure, and then click the location where you want the custom action to be displayed.

    Figure 1. New form ribbon

    New form ribbon

  4. This should display the Create Custom Action dialog box. In this dialog box, you can enter a name and description for the custom action, and then provide a URL to a form or Web page or point to a workflow.

    Figure 2. Create custom action

    Create custom action

  5. Click OK. Navigate to the list to see the custom action you added in the location you specified previously.

Add a Custom Action That Takes BDC Fields as Parameters

  1. Define an action in the BDC model from the beginning, or by using the SharePoint Central Administration. See the XML Snippet: Add an Action to an External Content Type in a BDC Model for an example.

  2. Navigate to the external list in the browser.

  3. Click Edit List on the ribbon.

    This opens the external list in Microsoft SharePoint Designer 2010.

  4. Click the Custom Action button on the ribbon, and then click the location where you want to display the custom action.

    This opens the Create Custom Action dialog box. In this dialog box, you can enter a name and description for the custom action, and then in the Navigate to URL field, provide a URL in the following format.

    ~site/_layouts/ActionRedirect.aspx?ItemID={ItemId}&EntityNamespace=<EnterEntityNamespaceFromModel>&EntityName=<EntityNameFromModel>
         &LOBSystemInstanceName=<LobSystemInstanceNameFromModel>&ActionName=<ActionNameFromModel>
    
  5. Replace <EnterEntityNamespaceFromModel>, <EntityNameFromModel>, <LobSystemInstanceNameFromModel>, and <ActionNameFromModel> with valid values from the BDC model. The action name and parameter names are case-sensitive.

    The following figure shows the Create Custom Action dialog box.

    Figure 3. Create Custom Action dialog box

    Create Custom Actio dialog

  6. Click OK. Navigate to the external list and you should see the custom action you added in the location you specified previously.