Tiny Demo (Video) of Custom Actions and Actions in BCS

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…

  1. Let’s customize the external list from the previous tiny demo
  2. You can customize a view like in the same way you customize a normal list
  3. Use the ribbon to open the List Settings page
  4. This is the standard list settings page, but with fewer options
  5. Scroll down to the Views section and click the view you want to edit
  6. I will hide the ID column because it has no meaning to a user and then click OK to update the view
  7. External lists don’t have the standard list Title column, so the item menu simply displays on the first column in the list
  8. I can add additional operations by creating a custom action in SPD or as a feature in Visual Studio
  9. In SPD, I navigate to the list and use the Custom Action button on the List Settings ribbon
  10. I can add items to the various ribbons for the list and also to the item menu
  11. The Create Custom action dialog allows creation of three types of custom actions
  • Navigation to form
  • Initiate workflow
  • Navigate to URL
  1. I will make one with the text Spider and an image of a spider to navigate to www.cnn.com.
  2. SharePoint will show or hide the custom action based on the user’s permissions
  3. I specify the ViewPages in the Rights Mask to make the action visible to those who can view pages
  4. You can control the order of the items on the menu or ribbon with a sequence number
  5. Let’s take a look at the result
  6. The item menu has the Spider
  7. Which opens CNN…
  8. Sorry to hear about Oprah
  9. 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
  10. There are a few tokens that you can use
  11. These include {ItemId} {ListId} and a few more, but none of them allow access to column values
  12. For example: I’ll add a query string with {ItemId} and {Address}
  13. The custom action now goes to CNN with a query string
  14. You can see it replaced {ItemId} but not {Address}
  15. This behavior requires and Action, not a Custom Action (Great naming isn’t it!)
  16. An Action is part of a External Content Type (AKA Business Data Entity) definition
  17. You can’t define one in SPD. You use SharePoint Central Administration instead.
  18. Select Manage service applications from Application Management
  19. And then click Business Data Connectivity
  20. This page shows all of the external content types in the farm
  21. The item menu includes a link to Add Action
  22. I will add an action to show the address of an item in Bing Maps
  23. The query string for Bing maps requires four fields for a complete address
  24. Unfortunately, this will not affect the Person list I already made
  25. So I will generate a new one from SPD
  26. The result works as expected – Elwood Blues lives at Wrigley Field?

 

Author: Doug Ware

Tiny Demo (Video) of External Lists and Content Types in SharePoint 2010 Beta

This is the first of many planned tiny demo video tutorials for SharePoint. This one is an introduction to Business Connectivity Services in the SharePoint 2010 Beta.

Please access my blog to view the video.

Steps…

  1. Open a site in SharePoint Designer 2010
  2. Select External Content Types in the Site Objects panel
  3. Click External Content Type on the ribbon to create a new external content type
  4. Give the type a name
  5. To select a data source click Add Connection
  6. SPD supports .NET, SQL Server, and WCF
  7. Select SQL Server and click OK
  8. Specify the server and database
  9. Accept the default Connect with User’s Identity. The other two choices require Secure Store – a topic for another demo
  10. Click OK
  11. The database appears in the Data Source Explorer
  12. Expand the tree to see the tables
  13. Select a table
  14. Click Create All Operations
  15. A Wizard appears! Click Next
  16. Complete the Wizard taking head of the warnings, especially the one about a Limit filter
  17. Save your work to create the external content type
  18. Click Create Lists & Forms on the ribbon to make a list
  19. Give the list a name and click OK
  20. Navigate to the list and edit an item
  21. Open the table in SQL Server to see that the change was made to the underlying record

Author: Doug Ware

The Big Thing That’s Missing from the Visual Studio 2010 Beta SharePoint Projects

Overall I’m pretty happy, ecstatic even, with what Visual Studio 2010 has for SharePoint Development. There is one thing that is conspicuously missing and I don’t understand why: support for ASP.NET pages. There are templates for a few specific types of ASP.NET pages:

The intent for each of these is that you will deploy them as Application Pages. But, what if you want just a plain ASP.NET page that you will deploy to a site via a module? Maybe you need a custom Web Part page, a custom list form, or any custom page that you would like your users to have the ability to customize in SharePoint Designer.

If so, you’ll have to add it to your solution by hand because the SharePoint projects don’t include the stock item template, just the ones shown below.

This deficiency is easy enough to work around manually, but speaking for the type of work we do at Elumenotion, it’s something we do often. Given the overall polish in the templates I personally hope it’s just an omission that they can fix easily and will fix before RTM.

Replaceable Parameters in Visual Studio 2010 SharePoint Projects

Now that the public beta cycle is in full swing the SharePoint blogs will be filling with tens of thousands of posts about the major new features and writers everywhere are buying new ribbons for their type writers. Indeed, this site will feature many new articles soon about amazing technologies heretofore glimpsed only in dreams. However, some of what excites me the most are little things that prove Microsoft heard the lamentations of the SharePoint development community and answered with simple and refined features to make everyday a better day.

Case in point: Replaceable Parameters.

A Replaceable Parameter is a string token bounded by a dollar sign ‘$’ that Visual Studio replaces with an actual value when it packages the solution. For example (from an ASP.NET page):

Visual Studio will replace the $SharePoint.Project.AssemblyFullName$ parameter with the full four-part assembly name when you run a build. This means no more running Reflector and manually copying the value and no more need to manually update version numbers by hand!

You can read about all of the Replaceable Parameters here: http://msdn.microsoft.com/en-us/library/ee231545(VS.100).aspx.