geoff varosky: creating custom actions in sharepoint 2010

36
Creating Custom Actions in SharePoint 2010 Geoff Varosky Twitter: @gvaro Email: [email protected] Blog: www.geoffvarosky.com Company: www.grace-hunt.com

Upload: sharepoint-saturday-ny

Post on 14-Jun-2015

409 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Creating Custom Actions in

SharePoint 2010

Geoff Varosky

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 2: Geoff Varosky: Creating Custom Actions in SharePoint 2010

About Me

Geoff VaroskyMCP, MCTSGrace-Hunt, LLC.

Senior Solutions DeveloperBlogger, Author, SpeakerBASPUG Co-Founder

Blog : http://www.geoffvarosky.comEmail : [email protected] : @gvaro

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 3: Geoff Varosky: Creating Custom Actions in SharePoint 2010

About Grace-Hunt, LLC.

Microsoft Gold PartnerBased in MA

North East, Mid-Atlantic, and South EastPractice Areas

Portals and CollaborationInformation Worker SolutionsNetworking Infrastructure SolutionsDynamics CRM, SL, GP, NAV

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 4: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Drop by the Grace-Hunt & AvePoint Booth

to enter to win a Netbook!

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 5: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Remember to fill out your evaluations to win these

prizes!

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

2 ASUS Netbooks

2 Apple 32GB iPads w/ Wifi2 Asus NetbooksBooks1 Typemock Isolator LicenseA 2-5 Day Course from SetFocus on SharePointTelerik RAD Controls Set1 DeliverPoint WFE 2010 license (Worth $1500)1 BCS Meta Man license (Worth $1200)1 Lightning Conductor 2010 WFE license (Worth $800)1 Lightning Storm Forums license. (Worth $600)

Page 6: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Big thanks to all Sponsors for making SPS NYC possible!

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 7: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Agenda

What are Custom Actions?Demonstrations

Using SharePoint DesignerImporting Into Visual StudioFinding Custom ActionsBuilding and Deploying in Visual Studio

ReferenceQ&A

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 8: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Tell me now, who are you working for, and what are these “Custom

Actions” you speak of?

AND NO SPRINKLES! GOD

HELP YOU IF I FIND SPRINKLES!

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 9: Geoff Varosky: Creating Custom Actions in SharePoint 2010

What Are Custom Actions…

Site Actions Menu

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 10: Geoff Varosky: Creating Custom Actions in SharePoint 2010

What Are Custom Actions…

Site Settings Menu

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 11: Geoff Varosky: Creating Custom Actions in SharePoint 2010

What Are Custom Actions…

Custom Action Group

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 12: Geoff Varosky: Creating Custom Actions in SharePoint 2010

What Are Custom Actions…

Edit Control Block (ECB) / List Item Menu

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 13: Geoff Varosky: Creating Custom Actions in SharePoint 2010

The Ribbon

Tabs

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 14: Geoff Varosky: Creating Custom Actions in SharePoint 2010

The Ribbon

TabsOrganize a set of groups

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 15: Geoff Varosky: Creating Custom Actions in SharePoint 2010

The Ribbon

TabsContain one or more controls

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 16: Geoff Varosky: Creating Custom Actions in SharePoint 2010

The Ribbon

MenuMenu SectionMRU Split Button

Most Recently Used

SpinnerSplit ButtonText BoxToggle Button

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

ControlsButtonCheckboxColor PickerCombo BoxDrop DownFlyout AnchorInsert TableLabel

http://go.gvaro.net/ap68oX

Page 17: Geoff Varosky: Creating Custom Actions in SharePoint 2010

What Are Custom Actions…

Bits of XMLJavaScript (optional)Code Behind (optional)

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 18: Geoff Varosky: Creating Custom Actions in SharePoint 2010

What Are Custom Actions…

Can be bound to…Lists

Tasks, Custom, Document Libraries, etc.

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 19: Geoff Varosky: Creating Custom Actions in SharePoint 2010

What Are Custom Actions…

Can be bound to…File Types

By Extension (.docx, .xlsx)

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 20: Geoff Varosky: Creating Custom Actions in SharePoint 2010

What Are Custom Actions…

Can be bound to…Content Types

Tasks, Documents, Custom Content TypesAll Content Types (0x)

http://go.gvaro.net/bbYxRy

Programmatic IdentifiersTasks List (107)Content Types (0x)

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 21: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Building Custom Actions

SharePoint Designer 2010Visual Studio 2010CKS:DEV

Adds Custom Action Item Templates

NotePad?

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 22: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Building Custom Actions

SharePoint Designer 2010Build Custom Actions

List Item MenuList View, Edit, Display Forms

Visual Studio 2010Import from WSP filePackageAdd FunctionalityDeploy

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 23: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

DEMOS!Building Custom Actions in SharePoint Designer

2010Importing Custom Actions into Visual Studio 2010

Listing All Custom ActionsUsing CKS:DEV

Custom Action GroupsHiding Custom Actions

Maybe more?

Page 24: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Bonus Round…

Referencing JavaScript FilesJan Tielens on EUSPhttp://go.gvaro.net/dvCSS6Can Add JavaScript into the HEAD of a page using a Custom ActionLocation references “/_layouts/” always

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 25: Geoff Varosky: Creating Custom Actions in SharePoint 2010

ReferencesDefault Custom Action Locations and IDs

http://go.gvaro.net/98xD4r (MSDN)

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 26: Geoff Varosky: Creating Custom Actions in SharePoint 2010

ReferencesUrlAction Tokens

~siteReferences the current SPWeb context

~sitecollectionReferences the current SPSite context

{ItemId}GUID of the item action is called from

{ItemUrl}URL of the item the action is called from

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 27: Geoff Varosky: Creating Custom Actions in SharePoint 2010

ReferencesUrlAction 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

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 28: Geoff Varosky: Creating Custom Actions in SharePoint 2010

ReferencesEric Kraus

Listing all Custom Actions in the Farm w/ PWShttp://go.gvaro.net/bD7OHm

MSDNCustom Action Definition Schema

CommandUI Defintions, Extensions, HandlersCustomAction, CustomActionGroup, HideCustomActionDefault Locations and IDshttp://go.gvaro.net/9q0QV2

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 29: Geoff Varosky: Creating Custom Actions in SharePoint 2010

ReferencesWictor Wilén

Creating Custom Ribbon ExtensionsPart 1 - http://go.gvaro.net/aFUwBWPart 2 - http://go.gvaro.net/aGlydC

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 30: Geoff Varosky: Creating Custom Actions in SharePoint 2010

ReferencesMy Blog

www.geoffvarosky.comCreating Custom Actions with SharePoint DesignerDefault List Type IDsDeploying Custom Actions Across All List TypesCustom Actions in SharePoint 2007SPBasePermissions Enumeration (Rights)

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 31: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 32: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Speaking Engagements

SharePoint Best Practices ConferenceAugust 24th-27th - Washington, D.C.

SharePoint Customization: Overcoming Hurdles and Avoiding Pain (with Mark Rackley)

http://www.bestpracticesconference.com

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 33: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Speaking Engagements

SharePoint Technology ConferenceOctober 20th – 22nd, Boston, MA

SharePoint Customization: Overcoming Hurdles and Avoiding Pain (with Mark Rackley)Creating Custom Actions in SharePoint

http://www.sptechcon.com

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 34: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Meets 2nd Wednesday/Month6P – 8PMMicrosoft N.E.R.D. Centerhttp://www.bostonsharepointug.orgTwitter: @BASPUG / #BASPUG

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 35: Geoff Varosky: Creating Custom Actions in SharePoint 2010

Q&A

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com

Page 36: Geoff Varosky: Creating Custom Actions in SharePoint 2010

About Me

Geoff Varosky MCP, MCTSGrace-Hunt, LLC.

Senior Solutions DeveloperBlogger, Author, SpeakerBASPUG Co-Founder

Blog : http://www.geoffvarosky.comEmail : [email protected]: @gvaro

Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com