John Chapman

[SharePoint 2010] Custom Actions – Intro

Share on TwitterShare on LinkedInShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit

This is the first in a series of posts about using Custom Actions in SharePoint 2010. To get started, I thought it prudent to introduce the topic to those who have not used Custom Actions in SharePoint before. Custom Actions are not a new concept to SharePoint 2010, much of this information also applies to SharePoint 2007.

In a nutshell, Custom Actions allow developers to make references to custom pages, actions, outside resources, etc. to the SharePoint interface. These can be added to:

  • The ribbon as a button:

     
  • The Site Actions menu as a menu item:

     
  • The Site Settings screen as a link item:

     

These custom actions can be added to many other areas of the interface, including List / Library Settings, Central Administration, the Document menu, and so forth.

Custom Actions are defined using an XML file that is part of a SharePoint solution. For example, the following XML would add a link to the Site Actions menu to take a user to Bing:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="SiteActionsToolbar" GroupId="SiteActions" Location="Microsoft.SharePoint.StandardMenu" Sequence="1000" Title="Bing">
    <UrlAction Url="http://www.bing.com"/>
  </CustomAction>
</Elements>

In the next article: A Step-By-Step guide to create a Custom Action using Visual Studio 2010.

Share on TwitterShare on LinkedInShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit

John Chapman

Hello, I'm John Chapman. I am a SharePoint developer living in Denver, Colorado. I develop solutions using ASP.NET, C#, jQuery, SQL, SharePoint, etc, and I thrive on the challenge of writing code to overcome the impossible, annoying, or otherwise difficult obstacles.

More Posts - Website - Twitter

1 Comment

  • John,

    I was wondering if you could tell me how would you designate the targeted users for your custom action? For example, what if you only wanted users with approvers permissions to view the custom action you added for Bing?

    Thanks

Leave a comment

John Chapman