New England Code Camp 13 Slide Decks and Code Samples

Code Camp 13 Logo - Courtesy Grey Wolf Design

The 13th New England Code Camp was a great event, and I am glad I had the chance to participate. This was my first code camp that I had the opportunity to present. It was definitely a different experience than the SharePoint Saturday events that I am usually presenting at and organizing, but a worthwhile experience. I cannot wait for the next one to come along!

Chris Bowen and Chris Piels did an excellent job organizing the event. Thanks to you both! And thank you to all who expressed interest in the Boston Area SharePoint Users Group, as well as attending my two sessions.

I presented two sessions back-to-back, first being What’s New For Developers in SharePoint 2010, and the second being Creating Custom Actions within SharePoint. Below, you will find my slide decks and code samples from each session.

What’s New For Developers in SharePoint 2010
Abstract: SharePoint 2010 offers developers a unique and well deserved set of tools to aid in the development of SharePoint 2010 solutions. In this session we’ll cover improvements in the UI and the toolsets themselves, from PowerShell as a powerful scripting interface to the API, the Developer Dashboard, the SharePoint Toolkit in Visual Studio 2010, and more.

Code Samples

PowerShell commands to enable the Developer Dashboard

   1: [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings.DisplayLevel='OnDemand';
   2: [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings.Update();

PowerShell command to get a listing of the URL, Author, and Title of a Web

   1: Get-SPweb -site | ft Url, Title, Author

PowerShell command to get the Title of all of the lists within a Web

   1: Get-SPweb -site | foreach { $_.Lists | ft $_.Url, Title }

PowerShell command to get the listing of all of the Resource settings for the User Code service (Sandbox Solutions)

   1: [Microsoft.SharePoint.Administration.SPUserCodeService]::Local.ResourceMeasures

PowerShell commands to enable the User Code service to run on a Domain Controller (local image development for Sandbox Solutions)

   1: $acl = Get-Acl HKLM:\System\CurrentControlSet\Control\ComputerName
   2: $person = [System.Security.Principal.NTAccount]"Users"
   3: $access = [System.Security.AccessControl.RegistryRights]::FullControl
   4: $inheritance = [System.Security.AccessControl.InheritanceFlags]"ContainerInherit, ObjectInherit"
   5: $propagation = [System.Security.AccessControl.PropagationFlags]::None
   6: $type = [System.Security.AccessControl.AccessControlType]::Allow
   7: $rule = New-Object System.Security.AccessControl.RegistryAccessRule($person, $access, $inheritance, $propagation, $type)
   8: $acl.AddAccessRule($rule)
   9: Set-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $acl

PowerShell commands to view the Property Bag of a Web

   1: $web = get-spweb -site
   2: $web.AllProperties | ft

Also, more information on SharePoint Server 2010 can be seen on my blog under the categories of SharePoint 2010 Beta 2, SharePoint Designer 2010, and SharePoint 2010.


Creating Custom Actions within SharePoint
Abstract: 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.

Code Samples

  • Demo #1 – Creating a Simple Custom Action

  • SPS.SiteRecycleBin

    • This was the second deployment I quickly ran through, which added a Site Recycle Bin link to the Site Actions page under the Site Administration Custom Action Group

    • Download:

  • SPSDC.SiteActionsRecycleBin

    • This is the solution that I walked through during the first demonstration. This will add links to both the current site recycle bin, as well as the site collection recycle bin to the Site Actions menu.

    • Download:

  • Demo #2 – Creating a Slightly More Complex Custom Action

    • Screencast:

    • SPS.CompleteTask

      • This is the solution from the second demonstration. This solution will add Complete Task links to the Tasks and Gantt Tasks (Project Tasks) lists shown in the Edit Control Block. This will allow you to set the task Status field to Completed, and the Percent Complete field to 100% for the given task.

      • Download:

    • Demo #3 – Hiding Custom Actions

        • Demo #4 – Custom Action Groups



          About Geoff Varosky
          Geoff Varosky is a Senior Architect for Insight, based out of Watertown, MA. He has been architecting and developing web based applications his entire career, and has been working with SharePoint for the past 15 years. Geoff is an active member of the SharePoint community, Co-Founder and Co-Organizer of the Boston Area SharePoint Users Group, co-founder for the Boston Office 365 Users Group, co-organizer for SharePoint Saturday Boston and speaks regularly at SharePoint events and user groups.

          Leave a Reply

          Fill in your details below or click an icon to log in:


          You are commenting using your account. Log Out /  Change )

          Facebook photo

          You are commenting using your Facebook account. Log Out /  Change )

          Connecting to %s

          %d bloggers like this: