Creating Custom Actions in
SharePoint 2010
Geoff Varosky
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
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
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
Drop by the Grace-Hunt & AvePoint Booth
to enter to win a Netbook!
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
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)
Big thanks to all Sponsors for making SPS NYC possible!
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
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
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
What Are Custom Actions…
Site Actions Menu
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
What Are Custom Actions…
Site Settings Menu
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
What Are Custom Actions…
Custom Action Group
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
What Are Custom Actions…
Edit Control Block (ECB) / List Item Menu
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
The Ribbon
Tabs
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
The Ribbon
TabsOrganize a set of groups
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
The Ribbon
TabsContain one or more controls
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
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
What Are Custom Actions…
Bits of XMLJavaScript (optional)Code Behind (optional)
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
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
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
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
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
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
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?
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
ReferencesDefault Custom Action Locations and IDs
http://go.gvaro.net/98xD4r (MSDN)
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
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
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
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
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
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
Twitter: @gvaroEmail: [email protected]: www.geoffvarosky.comCompany: www.grace-hunt.com
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
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
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
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