Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Creating Custom Actions in SharePoint 2010
1. Thinking SharePoint? Think Jornata.
Creating Custom Actions in
SharePoint 2010
Geoff Varosky
Prepared for
Director, Development & Evangelism
Prepared by
Jornata
Jornata
gvarosky@jornata.com
61-63 Chatham Street
Fourth Floor
Follow me on Twitter @gvaro
Boston, MA 02109
Submitted on April 25, 2012
2. About Me
• Geoff Varosky
– Jornata
• Director, Development & Evangelism
• BASPUG Co-Founder
• SPS Boston Co-Organizer
– Blog : www.sharepointyankee.com
– Email: gvarosky@jornata.com
– Twitter: @gvaro
– LinkedIn & Facebook
Thinking SharePoint? Think Jornata.
3. Agenda
• What are Custom Actions?
• Demonstrations
– Using SharePoint Designer
– Importing into Visual Studio
– Finding Custom Actions
– Building & Deployment in Visual Studio
• References
• Q&A
Thinking SharePoint? Think Jornata.
7. (CustomAction) Anatomy 101
• Id (optional)
– Specifies a unique identifier for custom action
– May be a GUID or a unique term
– Example: DeleteWeb
• GroupID (optional)
– Identifies the unique group that this element is
contained in
– Example: SiteTasks
Thinking SharePoint? Think Jornata.
8. (CustomAction) Anatomy 101
• Location (optional)
– Specifies the location for this custom action
– Example: Microsoft.SharePoint.SiteSettings
• RegistrationType (optional)
– Specifies the list, item content type, file type, or
programmatic identifier that this action is
associated with
– Example: List
Thinking SharePoint? Think Jornata.
9. (CustomAction) Anatomy 101
• RegistrationId (optional)
– Specifies the registration attachment for a per-
item action
– Example (List Identifier – Task List): 107
• {$ListId:Lists/Tasks;}
• (http://snipurl.com/ntd5g)
• Title (required)
– Specifies the name of your action
– Example: DeleteWeb
Thinking SharePoint? Think Jornata.
10. (CustomAction) Anatomy 101
• Description (optional)
– Longer description for action which is shown as a
tooltip or sub-description (where applicable) for
the action
– 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).
Thinking SharePoint? Think Jornata.
11. (CustomAction) Anatomy 101
• UrlAction Tokens
– ~site
– References the current SPWeb context
– ~sitecollection
– References the current SPSite context
– {ItemId}
– GUID of the item action is called from
– {ItemUrl}
– URL of the item the action is called from
Thinking SharePoint? Think Jornata.
12. (CustomAction) Anatomy 101
• UrlAction Tokens
– {ListId}
• GUID representation of the list
– {SiteUrl}
• References the URL of the SPWeb context the action is
called from
– {RecurrenceId}
• Unsupported in context menus
– http://go.gvaro.net/bHaqaQ
Thinking SharePoint? Think Jornata.
13. What are Custom Actions?
• Can be bound to…
– Lists
• Tasks, Document Libraries, Custom, etc.
Thinking SharePoint? Think Jornata.
14. What are Custom Actions?
• Can be bound to…
– File Types
• By Extension - .docx, .pl, .foo, .bar
Thinking SharePoint? Think Jornata.
15. What are Custom Actions?
• Can be bound to…
– Content Types
• Tasks, Documents, Custom
• All (0x)
– http://go.gvaro.net/bbYxRy
– Programmatic Identifiers
• Tasks List (107)
• Content Types (0x)
Thinking SharePoint? Think Jornata.
17. Building Custom Actions
• SharePoint Designer 2010
– Build Custom Actions
• List Item Menu
• List View, Edit, Display Forms
• Visual Studio 2010
– Import from WSP file
– Package
– Add Functionality
– Deploy
Thinking SharePoint? Think Jornata.
18. DEMOS!
Building Custom Actions in SharePoint Designer 2010
Importing Custom Actions into Visual Studio 2010
Listing All Custom Actions
Using CKS:DEV
Custom Action Groups
Hiding Custom Actions
Maybe more?
Thinking SharePoint? Think Jornata.
19. Bonus Round!
• Referencing JavaScript Files
– Jan Tielens on EUSP
– http://go.gvaro.net/dvCSS6
– Can Add JavaScript into the HEAD of a page using a
Custom Action
– Location references “/_layouts/” always
Thinking SharePoint? Think Jornata.
20. References
• Eric Kraus
– Listing all Custom Actions in the Farm with
PowerShell
– http://go.gvaro.net/bD7OHm
• MSDN
– Custom Action Definition Schema
• CommandUI Defintions, Extensions, Handlers
• CustomAction, CustomActionGroup, HideCustomAction
• Default Locations and IDs
– http://go.gvaro.net/9q0QV2
Thinking SharePoint? Think Jornata.
21. References
• Wictor Wilén
– Creating Custom Ribbon Extensions
– Part 1 - http://go.gvaro.net/aFUwBW
– Part 2 - http://go.gvaro.net/aGlydC
• Using JavaScript + Custom Actions to navigate
Document Libraries
– http://go.gvaro.net/h2w8mN
Thinking SharePoint? Think Jornata.
22. References
• My Blog
– www.sharepointyankee.com
• Search for “Custom Action”
• Creating Custom Actions with SharePoint Designer
• Default List Type IDs
• Deploying Custom Actions Across All List Types
• Custom Actions in SharePoint 2007
• SPBasePermissions Enumeration (Rights)
• Creating Custom Actions using SPD
• “Delete This Site”
• More…
Thinking SharePoint? Think Jornata.