Your SlideShare is downloading. ×
Creating Custom Actions in SharePoint 2010<br />Geoff Varosky<br />
About Me<br />Geoff Varosky<br />Grace Hunt<br />SharePoint Solutions Group<br />Director, Development & Evangelism<br />B...
About Grace Hunt<br />Microsoft Gold Partner<br />Founded 2004<br />Practice Areas<br />Microsoft SharePoint Technologies<...
Agenda<br />What are Custom Actions?<br />Demonstrations<br />Using SharePoint Designer<br />Importing into Visual Studio<...
What are Custom Actions?<br />Site Actions Menu<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.c...
What are Custom Actions?<br />Ribbon UI<br />Ribbon Tabs<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gr...
What are Custom Actions?<br />Site Settings Menu<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt....
What are Custom Actions?<br />Edit Control Block (ECB) / List Item Menu<br />geoffvarosky<br />gvarosky@gracehunt.com [ema...
What are Custom Actions?<br />Custom Action Group<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt...
What are Custom Actions?<br />Tabs<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br /...
What are Custom Actions?<br />Tabs<br />Organize a set of groups<br />Contain one or more controls<br />geoffvarosky<br />...
What are Custom Actions?<br />Controls<br />Button<br />Checkbox<br />Color Picker<br />Combo Box<br />Drop Down<br />Flyo...
What are Custom Actions?<br />Bits of XML<br /><CustomAction<br />	Id=“MyCustomAction”<br />Location=“Microsoft.SharePoint...
(CustomAction) Anatomy 101<br /><CustomAction<br />ContentTypeId = "Text" <br />ControlAssembly = "Text" <br />ControlClas...
(CustomAction) Anatomy 101<br /><CustomAction<br />ContentTypeId = "Text" <br />ControlAssembly = "Text" <br />ControlClas...
(CustomAction) Anatomy 101<br />Id (optional)<br />Specifies a unique identifier for custom action<br />May be a GUID or a...
(CustomAction) Anatomy 101<br />Location (optional)<br /><ul><li>Specifies the location for this custom action
Example: Microsoft.SharePoint.SiteSettings</li></ul>RegistrationType(optional)<br /><ul><li>Specifies the list, item conte...
Example: List</li></ul>geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee...
(CustomAction) Anatomy 101<br />RegistrationId(optional)<br /><ul><li>Specifies the registration attachment for a per-item...
Example (List Identifier – Task List): 107</li></ul>{$ListId:Lists/Tasks;}<br />(http://snipurl.com/ntd5g)<br />Title (req...
Example: DeleteWeb</li></ul>geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointy...
(CustomAction) Anatomy 101<br />Description(optional)<br /><ul><li>Longer description for action which is shown as a toolt...
Sequence (optional)
The order in which your action will appear.
If not specified, displayed in the order it is read by SharePoint by Feature and by order in element listing (XML).</li></...
(CustomAction) Anatomy 101<br />UrlAction Tokens<br /><ul><li>~site
References the current SPWeb context
Upcoming SlideShare
Loading in...5
×

SPTechCon San Francisco 2011 - Geoff Varosky - Creating Custom Actions in SharePoint 2010

2,323

Published on

Custom Actions control features in SharePoint, such as the Edit Control Block, the Site Actions menu, toolbars, and the links within the Site Settings page, as well as the Ribbon UI in SharePoint 2010. Learn how to leverage Custom Actions to extend the SharePoint user interface. This session will describe the basics of Custom Actions, a demonstration to build one or more and apply them to a site in SharePoint, describe some of the best practices around creating Custom Actions, and provide resources for additional information. Knowledge of C#, SharePoint, XML and Visual Studio will be helpful.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,323
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "SPTechCon San Francisco 2011 - Geoff Varosky - Creating Custom Actions in SharePoint 2010"

  1. 1. Creating Custom Actions in SharePoint 2010<br />Geoff Varosky<br />
  2. 2. About Me<br />Geoff Varosky<br />Grace Hunt<br />SharePoint Solutions Group<br />Director, Development & Evangelism<br />Blogger, Author, Speaker<br />BASPUG Co-Founder<br />SPS Boston Co-Organizer<br />Blog : www.sharepointyankee.com<br />Email: gvarosky@gracehunt.com<br />Twitter: @gvaro<br />LinkedIn & Facebook<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  3. 3. About Grace Hunt<br />Microsoft Gold Partner<br />Founded 2004<br />Practice Areas<br />Microsoft SharePoint Technologies<br />Business Process and Planning<br />Portals & Collaboration<br />Information Worker Solutions<br />Dynamics CRM, SL, GP, NAV<br />Microsoft Cloud Technologies<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  4. 4. Agenda<br />What are Custom Actions?<br />Demonstrations<br />Using SharePoint Designer<br />Importing into Visual Studio<br />Finding Custom Actions<br />Building & Deployment in Visual Studio<br />References<br />Q&A<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  5. 5. What are Custom Actions?<br />Site Actions Menu<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  6. 6. What are Custom Actions?<br />Ribbon UI<br />Ribbon Tabs<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  7. 7. What are Custom Actions?<br />Site Settings Menu<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  8. 8. What are Custom Actions?<br />Edit Control Block (ECB) / List Item Menu<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  9. 9. What are Custom Actions?<br />Custom Action Group<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  10. 10. What are Custom Actions?<br />Tabs<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  11. 11. What are Custom Actions?<br />Tabs<br />Organize a set of groups<br />Contain one or more controls<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  12. 12. What are Custom Actions?<br />Controls<br />Button<br />Checkbox<br />Color Picker<br />Combo Box<br />Drop Down<br />Flyout Anchor<br />Insert Table<br />Label<br />Menu<br />Menu Section<br />MRU Split Button<br />Most Recently Used<br />Spinner<br />Split Button<br />Text Box<br />Toggle Button<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  13. 13. What are Custom Actions?<br />Bits of XML<br /><CustomAction<br /> Id=“MyCustomAction”<br />Location=“Microsoft.SharePoint.SiteSettings<br /> … /><br />Links<br /><CustomAction…><br /> <UrlActionUrl=“http://www.foo.com” /><br /></CustomAction><br />JavaScript (optional)<br /><CustomAction …><br /> <UrlActionUrl=“javascript:DoSomething();” /><br /></CustomAction><br />Code Behind (optional)<br /><CustomAction<br /> …<br />ControlAssembly=“MyCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=63316a326e123aec"ControlClass=“MyCode.Class“ /><br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  14. 14. (CustomAction) Anatomy 101<br /><CustomAction<br />ContentTypeId = "Text" <br />ControlAssembly = "Text" <br />ControlClass = "Text" <br />ControlSrc = "Text" <br />Description = "Text" <br />GroupId = "Text" <br />Id = "Text" <br />ImageUrl = "Text" <br />Location = "Text" <br />RegistrationId = "Text" <br />RegistrationType = "Text" <br />RequireSiteAdministrator = "TRUE" | "FALSE" <br />Rights = "Text" <br />Sequence = "Integer" <br />ShowInLists = "TRUE" | "FALSE" <br />ShowInReadOnlyContentTypes = "TRUE" | "FALSE" <br />ShowInSealedContentTypes = "TRUE" | "FALSE" <br />Title = "Text"> <br /><URLAction URL=“” /><br /><CommandUI></CommandUI><br /></CustomAction><br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  15. 15. (CustomAction) Anatomy 101<br /><CustomAction<br />ContentTypeId = "Text" <br />ControlAssembly = "Text" <br />ControlClass = "Text" <br />ControlSrc = "Text" <br />Description = "Text" <br />GroupId = "Text" <br />Id = "Text" <br />ImageUrl = "Text" <br />Location = "Text" <br />RegistrationId = "Text" <br />RegistrationType = "Text" <br />RequireSiteAdministrator = "TRUE" | "FALSE" <br />Rights = "Text" <br />Sequence = "Integer" <br />ShowInLists = "TRUE" | "FALSE" <br />ShowInReadOnlyContentTypes = "TRUE" | "FALSE" <br />ShowInSealedContentTypes = "TRUE" | "FALSE" <br />Title = "Text"> <br /><URLAction URL=“” /><br /><CommandUI></CommandUI><br /></CustomAction><br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  16. 16. (CustomAction) Anatomy 101<br />Id (optional)<br />Specifies a unique identifier for custom action<br />May be a GUID or a unique term<br />Example: DeleteWeb<br />GroupID(optional)<br />Identifies the unique group that this element is contained in<br />Example: SiteTasks<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  17. 17. (CustomAction) Anatomy 101<br />Location (optional)<br /><ul><li>Specifies the location for this custom action
  18. 18. Example: Microsoft.SharePoint.SiteSettings</li></ul>RegistrationType(optional)<br /><ul><li>Specifies the list, item content type, file type, or programmatic identifier that this action is associated with
  19. 19. Example: List</li></ul>geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  20. 20. (CustomAction) Anatomy 101<br />RegistrationId(optional)<br /><ul><li>Specifies the registration attachment for a per-item action
  21. 21. Example (List Identifier – Task List): 107</li></ul>{$ListId:Lists/Tasks;}<br />(http://snipurl.com/ntd5g)<br />Title (required)<br /><ul><li>Specifies the name of your action
  22. 22. Example: DeleteWeb</li></ul>geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  23. 23. (CustomAction) Anatomy 101<br />Description(optional)<br /><ul><li>Longer description for action which is shown as a tooltip or sub-description (where applicable) for the action
  24. 24. Sequence (optional)
  25. 25. The order in which your action will appear.
  26. 26. If not specified, displayed in the order it is read by SharePoint by Feature and by order in element listing (XML).</li></ul>geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  27. 27. (CustomAction) Anatomy 101<br />UrlAction Tokens<br /><ul><li>~site
  28. 28. References the current SPWeb context
  29. 29. ~sitecollection
  30. 30. References the current SPSite context
  31. 31. {ItemId}
  32. 32. GUID of the item action is called from
  33. 33. {ItemUrl}
  34. 34. URL of the item the action is called from</li></ul>geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  35. 35. (CustomAction) Anatomy 101<br />UrlAction Tokens<br />{ListId}<br />GUID representation of the list<br />{SiteUrl}<br />References the URL of the SPWeb context the action is called from<br />{RecurrenceId}<br />Unsupported in context menus<br />http://go.gvaro.net/bHaqaQ<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  36. 36. What are Custom Actions?<br />Can be bound to…<br />Lists<br />Tasks, Document Libraries, Custom, etc.<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  37. 37. What are Custom Actions?<br />Can be bound to…<br />File Types<br />By Extension - .docx, .pl, .foo, .bar<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  38. 38. What are Custom Actions?<br />Can be bound to…<br />Content Types<br />Tasks, Documents, Custom<br />All (0x)<br />http://go.gvaro.net/bbYxRy<br />Programmatic Identifiers<br />Tasks List (107)<br />Content Types (0x)<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  39. 39. Building Custom Actions<br />SharePoint Designer 2010<br />Visual Studio 2010<br />CKS:DEV<br />Adds Custom Action Item Templates<br />http://cksdev.codeplex.com<br />NotePad?<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  40. 40. Building Custom Actions<br />SharePoint Designer 2010<br />Build Custom Actions<br />List Item Menu<br />List View, Edit, Display Forms<br />Visual Studio 2010<br />Import from WSP file<br />Package<br />Add Functionality<br />Deploy<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  41. 41. DEMOS!<br />Building Custom Actions in SharePoint Designer 2010Importing Custom Actions into Visual Studio 2010Listing All Custom ActionsUsing CKS:DEVCustom Action GroupsHiding Custom ActionsMaybe more?<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  42. 42. Bonus Round!<br />Referencing JavaScript Files<br />Jan Tielens on EUSP<br />http://go.gvaro.net/dvCSS6<br />Can Add JavaScript into the HEAD of a page using a Custom Action<br />Location references “/_layouts/” always<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  43. 43. References<br />Eric Kraus<br />Listing all Custom Actions in the Farm with PowerShell<br />http://go.gvaro.net/bD7OHm<br />MSDN<br />Custom Action Definition Schema<br />CommandUIDefintions, Extensions, Handlers<br />CustomAction, CustomActionGroup, HideCustomAction<br />Default Locations and IDs<br />http://go.gvaro.net/9q0QV2<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  44. 44. References<br />WictorWilén<br />Creating Custom Ribbon Extensions<br />Part 1 - http://go.gvaro.net/aFUwBW<br />Part 2 - http://go.gvaro.net/aGlydC <br />Using JavaScript + Custom Actions to navigate Document Libraries<br />http://go.gvaro.net/h2w8mN<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  45. 45. References<br />My Blog<br />www.sharepointyankee.com<br />Search for “Custom Action”<br />Creating Custom Actions with SharePoint Designer<br />Default List Type IDs<br />Deploying Custom Actions Across All List Types<br />Custom Actions in SharePoint 2007<br />SPBasePermissions Enumeration (Rights)<br />Creating Custom Actions using SharePoint Designer 2010<br />“Delete This Site”<br />More…<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  46. 46. geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  47. 47. Meets 2nd Wednesday/Month<br />6P – 8PM<br />Microsoft N.E.R.D. Center<br />http://www.bostonsharepointug.org<br />Twitter: @BASPUG / #BASPUG<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  48. 48. Q&A<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />
  49. 49. About Me<br />Geoff Varosky<br />Grace Hunt<br />SharePoint Solutions Group<br />Director, Development & Evangelism<br />Blogger, Author, Speaker<br />BASPUG Co-Founder<br />SPS Boston Co-Organizer<br />Blog : www.sharepointyankee.com<br />Email: gvarosky@gracehunt.com<br />Twitter: @gvaro<br />geoffvarosky<br />gvarosky@gracehunt.com [email]<br />www.gracehunt.com [web]<br />sharepointyankee.com [blog]<br />@gvaro [twitter]<br />

×