|
|
|
|
|
|
|
|
|
|
|
|
|
|
Elumenotion > Elumenotion Blog > Posts > Tiny Demo (Video) of Custom Actions and Actions in BCS
|
11/20/2009
Perhaps you think the title of this post makes no sense? Watch the video to learn how to extend an external content type's behavior with Custom Actions from SharePoint Designer (or features) and with Actions from Central Administration (or entity XML).
Please access my blog to view the video.
Transcript…
- Let's customize the external list from the previous tiny demo
- You can customize a view like in the same way you customize a normal list
- Use the ribbon to open the List Settings page
- This is the standard list settings page, but with fewer options
- Scroll down to the Views section and click the view you want to edit
- I will hide the ID column because it has no meaning to a user and then click OK to update the view
- External lists don't have the standard list Title column, so the item menu simply displays on the first column in the list
- I can add additional operations by creating a custom action in SPD or as a feature in Visual Studio
- In SPD, I navigate to the list and use the Custom Action button on the List Settings ribbon
- I can add items to the various ribbons for the list and also to the item menu
- The Create Custom action dialog allows creation of three types of custom actions
- Navigation to form
- Initiate workflow
- Navigate to URL
- I will make one with the text Spider and an image of a spider to navigate to www.cnn.com.
- SharePoint will show or hide the custom action based on the user's permissions
- I specify the ViewPages in the Rights Mask to make the action visible to those who can view pages
- You can control the order of the items on the menu or ribbon with a sequence number
- Let's take a look at the result
- The item menu has the Spider
- Which opens CNN...
- Sorry to hear about Oprah
- Navigate to URL is limited in its utility in real life because you can't pass meaningful data from the item on the query string
- There are a few tokens that you can use
- These include {ItemId} {ListId} and a few more, but none of them allow access to column values
- For example: I'll add a query string with {ItemId} and {Address}
- The custom action now goes to CNN with a query string
- You can see it replaced {ItemId} but not {Address}
- This behavior requires and Action, not a Custom Action (Great naming isn't it!)
- An Action is part of a External Content Type (AKA Business Data Entity) definition
- You can't define one in SPD. You use SharePoint Central Administration instead.
- Select Manage service applications from Application Management
- And then click Business Data Connectivity
- This page shows all of the external content types in the farm
- The item menu includes a link to Add Action
- I will add an action to show the address of an item in Bing Maps
- The query string for Bing maps requires four fields for a complete address
- Unfortunately, this will not affect the Person list I already made
- So I will generate a new one from SPD
- The result works as expected - Elwood Blues lives at Wrigley Field?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|