The Ribbon UI and Custom Actions in SharePoint 2010
description
Transcript of The Ribbon UI and Custom Actions in SharePoint 2010
![Page 1: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/1.jpg)
The Ribbon UI and Custom Actions in SharePoint 2010Geoff VaroskyDecember 11, 2012
![Page 2: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/2.jpg)
![Page 3: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/3.jpg)
![Page 4: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/4.jpg)
ABOUT ME
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
Geoff Varosky Jornata
Managing Consultant, Senior Architect, Senior Developer, Director of Evangelism
Co-Founder Boston Area SharePoint Users Group Co-Organizer SharePoint Saturday Boston
Blog – www.SharePointYankee.com Email – [email protected] Twitter – @gvaro LinkedIn & Facebook
![Page 5: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/5.jpg)
AGENDA
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
Introducing the Ribbon UI Demo
What are Custom Actions? Demo
Resources Q&A
![Page 6: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/6.jpg)
INTRODUCING THE RIBBON UI
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 7: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/7.jpg)
WHAT ARE CUSTOM ACTIONS?
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 8: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/8.jpg)
WHAT ARE CUSTOM ACTIONS? Anything that can be put into an HREF anchor tag
or “link”
<a href=“CUSTOMACTION”>linky linky</a>
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 9: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/9.jpg)
WHAT ARE CUSTOM ACTIONS? Bits of XML
<CustomActionId=“MyCustomAction”Location=“Microsoft.SharePoint.SiteSettings… />
Links<CustomAction …>
<UrlAction Url=“http://www.foo.com” /></CustomAction>
JavaScript<CustomAction …>
<UrlAction Url=“javascript:DoSomething();” /></CustomAction>
Code Behind<CustomAction
…ControlAssembly=“MyCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=63316a326e123aec"ControlClass=“MyCode.Class“ />
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 10: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/10.jpg)
WHAT ARE CUSTOM ACTIONS?
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
Can be bound to… Lists
Tasks, Document Libraries, Custom, etc.
![Page 11: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/11.jpg)
WHAT ARE CUSTOM ACTIONS?
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
Can be bound to… File Types
By Extension - .docx, .pl, .foo, .bar
![Page 12: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/12.jpg)
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)
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 13: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/13.jpg)
BUILDING CUSTOM ACTIONS SharePoint Designer 2010
Build Custom Actions List Item Menu (Context Menu) List View, Edit, Display Forms
Visual Studio 2010 Import from WSP file Add functionality Package Deploy
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 14: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/14.jpg)
URLACTION TOKENS ~site
Site (Web) ~sitecollection
Site Collection {ItemId}
GUID representation of the current item {ItemUrl}
URL of the current item {ListId} {ListURL} {RecurrenceId}
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 15: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/15.jpg)
(CUSTOMACTION) ANATOMY 101<CustomAction
ContentTypeId = "Text" ControlAssembly = "Text" ControlClass = "Text" ControlSrc = "Text" Description = "Text" GroupId = "Text" Id = "Text" ImageUrl = "Text" Location = "Text" RegistrationId = "Text" RegistrationType = "Text" RequireSiteAdministrator = "TRUE" | "FALSE" Rights = "Text" Sequence = "Integer" ShowInLists = "TRUE" | "FALSE" ShowInReadOnlyContentTypes = "TRUE" | "FALSE" ShowInSealedContentTypes = "TRUE" | "FALSE" Title = "Text"> <URLAction URL=“” /><CommandUI></CommandUI>
</CustomAction>
![Page 16: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/16.jpg)
(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
![Page 17: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/17.jpg)
(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
![Page 18: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/18.jpg)
(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
![Page 19: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/19.jpg)
(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).
![Page 20: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/20.jpg)
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
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 21: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/21.jpg)
RESOURCES Custom Actions Articles on my blog
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) And more! http://go.gvaro.net/dZS9NJ
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 22: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/22.jpg)
RESOURCES MSDN
Custom Action Definition Schema CommandUI Defintions, Extensions, Handlers CustomAction, CustomActionGroup, HideCustomAction Default Locations and IDs http://go.gvaro.net/9q0QV2
Eric Kraus Listing all Custom Actions in the Farm with PowerShell http://go.gvaro.net/bD7OHm
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 23: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/23.jpg)
RESOURCES 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
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 25: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/25.jpg)
BOSTON AREA SHAREPOINT UG Meets 2nd Wednesday/month 6-8PM Microsoft N.E.R.D. (Cambridge) BostonSharePointUG.org Twitter: @BASPUG / #BASPUG
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
![Page 27: The Ribbon UI and Custom Actions in SharePoint 2010](https://reader035.fdocuments.in/reader035/viewer/2022070419/56815d4f550346895dcb59ad/html5/thumbnails/27.jpg)
ABOUT ME
[email protected] | @gvaro | www.sharepointyankee.com | www.jornata.com | @JornataLLC
Geoff Varosky Jornata
Managing Consultant, Senior Architect, Senior Developer, Director of Evangelism
Co-Founder Boston Area SharePoint Users Group Co-Organizer SharePoint Saturday Boston
Blog – www.SharePointYankee.com Email – [email protected] Twitter – @gvaro LinkedIn & Facebook