Your SlideShare is downloading. ×
0
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Creating Custom Actions within SharePoint
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Creating Custom Actions within SharePoint

2,392

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. Learn how to leverage Custom Actions to …

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. 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, as well as provide resources for additional information.

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

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

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • stsadm -o activatefeature -name SPS.HideCustomAction -url http://site.litwareinc.com
  • Transcript

    • 1. Creating Custom Actionswithin SharePointGeoff Varosky<br />
    • 2. About Me<br />Geoff Varosky MCP, MCTS<br />Senior Solutions Developer for Grace-Hunt, LLC.<br />Blog: http://www.geoffvarosky.com<br />Email: gvarosky@grace-hunt.com<br />Twitter: @gvaro<br />
    • 3. About Grace-Hunt<br />Founded in 2004<br />Based in Hudson, MA<br />Presence in North East, Mid Atlantic, and South East Regions<br />Microsoft Gold Partner<br />Specializing in SharePoint and Dynamics (CRM, SL, GP, NAV) Consulting, Implementation, and Integration<br />Web: http://www.grace-hunt.com<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 4. Agenda<br />What are Custom Actions?<br />Demonstrations<br />Creating a Simple Custom Action<br />Anatomy of a Custom Action<br />Creating a Slightly More Complex Custom Action<br />Hiding Custom Actions<br />Custom Action Groups<br />References<br />Q&A<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 5. Examples<br />Toolbars<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 6. Examples<br />Site Actions Menu<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 7. Examples<br />Site Settings<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 8. Examples<br />Site Settings (Custom Action Group)<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 9. Examples<br />Edit Control Block (ECB)<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 10. Examples<br />Central Administration Pages<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 11. Just What Are Custom Actions?<br />Per Microsoft –<br />“A custom action represents a link, toolbar button, menu item, or any control that can be added to a toolbar or menu that a user sees. Custom actions can be bound to list type, content type, file type, or programmatic identifier (ProgID).”<br />Source: http://snipurl.com/d8y70<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 12. Just What Are Custom Actions?<br />What does that mean?<br />Bits of XML<br />Deployed via Features<br />Create a Link within SharePoint<br />Specific Location<br />JavaScript, AJAX, URLs, etc.<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 13. Just What Are Custom Actions?<br />What does that mean?<br />Custom Actions can be bound to List Types<br />A Custom Action can be bound to a Document Library, but, may not be bound to a Task List<br />Example: Check In/Check Out<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 14. Just What Are Custom Actions?<br />What does that mean?<br />Custom Actions can be bound to File Types<br />Example: ‘Edit in Microsoft Word’ bound to Word (.doc, .docx) document types<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 15. Just What Are Custom Actions?<br />What does that mean?<br />Custom Actions can be bound to Content Types<br />Example: Folders, Document Content Types, List Content Types, etc.<br />Programmatic Identifiers<br />Example: Task List Identifier (107)<br />http://snipurl.com/ntd5g<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 16. What Can Custom Actions Do?<br />But wait, there’s more!<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 17. What Can Custom Actions Do?<br />But wait, there’s more!<br />Create links to pages that really should be there…<br />Example: There is a link to the Site Collection Recycle Bin on the Site Settings page, however, there is no link to the current site Recycle Bin. (Demo #1)<br />Custom Actions can pass along information to act upon<br />Example: Add a “Complete Task” action to an Edit Control Block, which calls an ASPX page, taking the parameters of the List ID and Item ID, and updating the task item within a list. (Demo #2)<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 18. What Can Custom Actions Do?<br />…and more<br />Custom Actions can also be hidden<br />Example: You do not want site administrators to be able to delete their sites by using the Delete This Site link on the Site Settings page so, we can remove it by using HideCustomAction (Demo #3)<br />Create Groupings of Custom Actions by using CustomActionGroup<br />Example: Create a grouping of your Custom Actions on the Site Settings page for all of your Custom Actions… (Demo #4)<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 19. What Tools Are Needed?<br />Notepad<br />What do I use?<br />Visual Studio<br />Andrew Connell’s SharePoint Project Utility for Visual Studio<br />http://snipurl.com/d8yv9<br />Requires DevExpress DX Core to be installed (free)<br />WSPBuilder (CodePlex)<br />http://snipurl.com/d8yxv<br />SharePoint Solution Installer (CodePlex)<br />http://snipurl.com/nt6ux<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 20. Demo<br />Creating a Simple <br />Custom Action<br />View Demo: http://www.vimeo.com/9728285<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 21. Anatomy of a Custom Action<br />Feature Definition (feature.xml)<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 22. Anatomy of a Custom Action<br />Scope<br /><ul><li> Web
    • 23. A “sub-site”
    • 24. Only activates the feature on the specific web
    • 25. Site
    • 26. Site Collection
    • 27. Applies to all webs within the site collection
    • 28. Web Application
    • 29. Applies to all site collections and webs within a web application
    • 30. Farm
    • 31. Applies to all web applications, site collections, etc.....</li></ul>Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 32. Anatomy of a Custom Action<br />Element Manifest (manifest.xml)<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 33. Anatomy of a Custom Action<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 /></CustomAction><br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 34. Anatomy of a Custom Action<br />Id (optional)<br /><ul><li>Specifies a unique identifier for custom action
    • 35. May be a GUID or a unique term
    • 36. Example:DeleteWeb</li></ul>GroupID(optional)<br /><ul><li>Identifies the unique group that this element is contained in
    • 37. Example:SiteAdministration</li></ul>Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 38. Anatomy of a Custom Action<br />Location (optional)<br /><ul><li>Specifies the location for this custom action
    • 39. 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
    • 40. Example: List</li></ul>Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 41. Anatomy of a Custom Action<br />RegistrationId(optional)<br /><ul><li>Specifies the registration attachment for a per-item action
    • 42. Example (List Identifier – Task List): 107 (http://snipurl.com/ntd5g)</li></ul>Title (required)<br /><ul><li>Specifies the name of your action
    • 43. Example: DeleteWeb</li></ul>Description (optional)<br /><ul><li>Longer description for action which is shown as a tooltip or sub-description (where applicable) for the action</li></ul>Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 44. Anatomy of a Custom Action<br />Sequence (optional)<br /><ul><li>The order in which your action will appear.
    • 45. If not specified, displayed in the order it is read by SharePoint by Feature and by order in element listing (XML).</li></ul>Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 46. Anatomy of a Custom Action<br />Permissions<br /><ul><li>RequireSiteAdministrator (optional)
    • 47. Boolean (True or False)
    • 48. Cannot be used on ECB menu list items
    • 49. Rights
    • 50. Specify rights needed for this Custom Action to be visible
    • 51. Example: “ApproveItems,DeleteListItems”
    • 52. Possible Values http://snipurl.com/ntcz5</li></ul>Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 53. Anatomy of a Custom Action<br />UrlAction Tokens<br /><ul><li>~site
    • 54. References the current SPWeb context
    • 55. ~sitecollection
    • 56. References the current SPSite context
    • 57. {ItemId}
    • 58. GUID of the item action is called from
    • 59. {ItemUrl}
    • 60. URL of the item the action is called from</li></ul>Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 61. Anatomy of a Custom Action<br />UrlAction Tokens<br /><ul><li>{ListId}
    • 62. GUID representation of the list
    • 63. {SiteUrl}
    • 64. References the URL of the SPWeb context the action is called from
    • 65. {RecurrenceId}
    • 66. Unsupported in context menus (http://snipurl.com/ntcjc)
    • 67. Source URL
    • 68. This token is not available, but there is a way to get it via JavaScript, which we will see in Demo #2
    • 69. http://snipurl.com/d8zb6</li></ul>Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 70. Demo<br />Creating a Slightly More Complex Custom Action<br />View Demo: http://www.vimeo.com/9728320<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 71. Demo<br />Hiding Custom Actions<br />View Demo: http://www.vimeo.com/9728353<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 72. Demo<br />Custom Action Groups<br />View Demo: http://www.vimeo.com/9759410<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 73. Resources<br />My Blog<br />http://www.geoffvarosky.com<br />Click on SharePoint Saturday category on left side of page<br />GraceHunt.SharePointCodePlex Projects<br />http://codeplex.com/GraceHunt<br />John Holliday’s Custom Action Resources<br />Hiding Custom Actions, and a Utility to get all custom action identifiers http://snipurl.com/d8zea<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 74. Resources<br />MSDN<br />Custom Action Definitions <br />http://snipurl.com/d8zi7<br />Default Custom Action Locations and IDs <br />http://snipurl.com/d8zka<br />How to: Add Custom Actions to the User Interface<br />http://snipurl.com/d8zq2<br />CustomAction Element <br />http://snipurl.com/d9jd4<br />CustomActionGroup Element <br />http://snipurl.com/d9jfx<br />HideCustomAction Element<br />http://snipurl.com/d9jhs<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 75. Resources<br />Custom Actions in SharePoint 2010<br />Adding Custom Button to the SharePoint 2010 Ribbon<br />http://snipurl.com/tz3vq by Jonathon Frost @ MSDN<br />Adding Custom Actions to the List Item Menu in SharePoint 2010 Using SharePoint Designer 2010 http://snipurl.com/tr0t3 by Geoff Varosky<br />How to Add a Tab to the Ribbon in SharePoint Foundation http://snipurl.com/tz3wi by Andrew May @ SP Dev Doc Team<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 76. Q&A<br />Twitter: @gvaro<br />Email: gvarosky@grace-hunt.com<br />Blog: www.geoffvarosky.com<br />Company: www.grace-hunt.com<br />
    • 77. About Me<br />Geoff Varosky MCP, MCTS<br />Senior Solutions Developer for Grace-Hunt, LLC.<br />Company: http://www.grace-hunt.com<br />Blog: http://www.geoffvarosky.com<br />Email: gvarosky@grace-hunt.com<br />Twitter: @gvaro<br />

    ×