6/10/2010

Planning WAY Ahead… SharePoint Conference 2011

 

SharePoint Conference 2011

 

It’s June 2010 and Microsoft SharePoint Team is announcing SharePoint Conference 2011:

http://blogs.msdn.com/b/sharepoint/archive/2010/06/08/save-the-date-sharepoint-conference-2011.aspx

(Maybe it’s a way of saying… no SharePoint Conference 2010!)

 

The conference site is already online!  http://www.mssharepointconference.com/Pages/default.aspx

But you can’t register until the spring of 2011…

 

SharePoint Conference 2011 – October 3-6 2011 - Anaheim, California

 

This is so far in the future… that Outlook OWA is even confused.  It thinks that 10/6/11 is Thursday in the dropdown, but also Sunday in the popup calendar!  (See… I’ve put in my calendar, so should you!)

 

image

 

.

6/04/2010

TechTrainingNotes now twittering…

 

I’ve been pestered about not being up to date and “twittering”. Well, I’m not twittering, but my blog site is…

 

My blog is on blogspot.com and they have added a feature to “twitter” new blog articles.

 

So…

Follow TechTrainNotes on Twitter

 

 

 

 

You can of course still use an RSS feed:   image  http://feeds2.feedburner.com/TechTrainingNotes

.

5/29/2010

SharePoint: Rotating Pictures, Random Pictures (yet again!)

 

This little Content Editor Web Part trick has turned out to be pretty popular. Too popular… it has generated a lot of requests for “could also add…”.  So here are two of those, navigation buttons, and caption text.

 

image

 

First go the original article and read about how this all works:
   http://techtrainingnotes.blogspot.com/2009/07/sharepoint-rotating-pictures-random.html

 

What’s been added:

  • Two new options:
    • manualClick – set this to true to display the First, Previous, Play, Next and Last buttons
    • customTextColumn – set this to true to add a “caption” or custom text

What else you will need/want to do:

  • Customize the HTML at the end of the code. My example puts the picture on the left and the text on the right and left aligns the buttons
  • Replace the navigation hyperlinks with real buttons or images

Now the revised steps to setup this up:

  • Create your picture library and upload your pictures
     
  • If you would like to supply text/captions for the pictures, add a “Single line of text” or “Multiple lines of text” column 
     
  • If you would like to filter the list of pictures to be displayed, customize the library to add additional columns to how the filter data. (Event name, department, product, etc)
     
  • Go to your web part page and add the web part for the new library
     
  • Important steps:
    • Click Edit, Modify Shared Web Part
    • Optional: In the appearance section give the web part a meaningful name
    • Click Edit the Current View
    • Un-checkmark all of the columns except for “Name (linked to document)”
    • Checkmark a column to use for the custom URL (if you don’t have a custom URL then select any column)   (this must be the second column in the view)
    • Checkmark a column to use as a custom text/caption (this must be the third column in the view)
    • Optional: Set the sort order
    • Optional: Set filter options to select only the pictures you want displayed
    • Make sure the the list web part view is not using a "Item Limit" less then the number of pictures in the list. (You could just set this to be BIG number).
    • Click OK to save the view changes
    • Click OK to save the web part changes
       
  • Add a Content Editor Web Part (CEWP) below the picture library web part
     
  • Click Edit, Modify Shared Web Part
     
  • Click Source Editor
     
  • Copy and paste the code from below
  • Edit the “vars” at the beginning of the JavaScript
    • pictureWebPartName – enter the web part, and if your library has a description, then include it:
         Example: Library name: “Airshow Pictures”
                 var pictureWebPartName="Airshow Pictures
         Example: Library name: “Airshow Pictures”,  description: “Pictures from the Dayton Airshow” 
                 var pictureWebPartName="Airshow Pictures -  Pictures from the Dayton Airshow”
       
    • Also edit showThumbnails, randomImg, useCustomLinks, RotatingPicturesLoopTime, imgToImgTransition, manualClick and customTextColumn as needed
       
  • Click OK for the Source Editor
     
  • Click OK to save the web part changes
     
  • Click Exit Edit Mode and see if it works!
     

The Code

<script>
// another CEWP trick from http://techtrainingnotes.blogspot.com
var pictureWebPartName="Airshow Pictures - Pictures from the Dayton Airshow"; // name of the picture library web part
var showThumbnails = true;      //otherwise show full sized images
var randomImg = true;           //set to true to show in random order
var useCustomLinks = true;     //true to use second column as URL for picture clicks
var RotatingPicturesLoopTime = 5000;  //2000 = 2 seconds
var imgToImgTransition = 1.0;         //2 = 2 seconds  
var manualClick = true;         //true to use the play pause buttons
var customTextColumn = true;    //true to display text / caption

// don't change these
var selectedImg = 0;
var imgCache = [];
var imgTag;

function RotatingPictures()
{

  if (manualClick) {buttonRow.style.display="inline"};
  if (customTextColumn == "") {customTextTD.style.display="none"}

  imgTag = document.getElementById("RotatingImage");
  //Find the picture web part and hide it
  var Imgs = [];
  var x = document.getElementsByTagName("TD"); // find all of the table cells
  var LinkList;
  var i=0;

  for (i=0;i<x.length;i++) 
  {
    if (x[i].title == pictureWebPartName)
    {
      // tables in tables in tables... ah SharePoint!
      LinkList = x[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
      // hide the links list web part
      LinkList.style.display="none"; 
      break;
    } 
  }

  if (!LinkList)
  {
    document.all("RotatingImageMsg").innerHTML="Web Part '" + pictureWebPartName + "' not found!";
  }

  //Copy all of the links from the web part to our array

  var links = LinkList.getElementsByTagName("TR") // find all of the rows
  var url;
  var len;
  for (i=0;i<links.length;i++) 
  {
    
    if (links[i].childNodes[0].className=="ms-vb2")
    {
      len=Imgs.length
      Imgs[len]=[]
      Imgs[len][0] = links[i].childNodes[0].childNodes[0].href;
      if (useCustomLinks)
      {
        if (links[i].childNodes[1].childNodes.length>0)
         { Imgs[len][1] = links[i].childNodes[1].childNodes[0].href; }
         else
         { Imgs[len][1] = "" }
      }
      if (customTextColumn)
      { 
        if (links[i].childNodes[1].childNodes.length>0)
         {Imgs[len][2] = links[i].childNodes[1].nextSibling.childNodes[0].innerHTML;}
         else
         {Imgs[len][2] = "" }      }
    }
  }
  if (Imgs.length==0)
  {
    document.all("RotatingImageMsg").innerHTML="No images found in web part '" + pictureWebPartName + "'!";
  }
  for (i = 0; i < Imgs.length; i++)
  {
    imgCache[i] = new Image();
    imgCache[i].src = Imgs[i][0];
    if (useCustomLinks)
    {
      imgCache[i].customlink=Imgs[i][1];
    }
    if (customTextColumn)
    {
      imgCache[i].customtext=Imgs[i][2];
    }

  }
  RotatingPicturesLoop();
}


// now show the pictures...
function RotatingPicturesLoop()
{
  if (!manualClick)
    if (randomImg)
    {
      selectedImg=Math.floor(Math.random()*imgCache.length);
    }

  if (document.all){
      imgTag.style.filter="blendTrans(duration=" + imgToImgTransition + ")";
      imgTag.filters.blendTrans.Apply();
  }

  url=imgCache[selectedImg].src
  if (useCustomLinks)
  { RotatingImageLnk.href=imgCache[selectedImg].customlink; } 
  else
  { RotatingImageLnk.href = url; }

  if (customTextColumn) 
     customTextTD.innerHTML = imgCache[selectedImg].customtext.replace(/&lt;/g,'<').replace(/&gt;/g,'>');
  else
     customTextTD.innerHTML = "";

  if (showThumbnails)
  {
    // convert URLs to point to the thumbnails...
    //   from  airshow%20pictures/helicopter.jpg
    //   to    airshow%20pictures/_t/helicopter_jpg.jpg

    url = revString(url);
    c = url.indexOf(".");
    url = url.substring(0,c) + "_" + url.substring(c+1,url.length);
    c = url.indexOf("/");
    url = url.substring(0,c) + "/t_" + url.substring(c,url.length);
    url = revString(url) + ".jpg";
  }


  imgTag.src = url;
  if (document.all){
    imgTag.filters.blendTrans.Play();
  }

  if (!manualClick)
  {
    selectedImg += 1;
    if (selectedImg > (imgCache.length-1)) selectedImg=0;

    setTimeout(RotatingPicturesLoop, RotatingPicturesLoopTime);
  }
}


// utility function revString found here:
// http://www.java2s.com/Code/JavaScript/Language-Basics/PlayingwithStrings.htm
function revString(str) { 
   var retStr = ""; 
   for (i=str.length - 1 ; i > - 1 ; i--){ 
      retStr += str.substr(i,1); 
   } 
   return retStr; 
}

function moveFirst() {manualClick = true; selectedImg = 0; RotatingPicturesLoop()}
function moveNext() {manualClick = true; selectedImg += 1; if (selectedImg > (imgCache.length-1)) selectedImg=0; RotatingPicturesLoop()}
function movePrev() {manualClick = true; selectedImg -= 1; if (selectedImg < 0 ) selectedImg=imgCache.length-1; RotatingPicturesLoop()}
function moveLast() {manualClick = true; selectedImg = imgCache.length-1;  RotatingPicturesLoop()}

function movePlay() {
  if (PlayButton.innerHTML=="Play") 
  {
    manualClick = false; 
    PlayButton.innerHTML="Pause"; 
  } 
  else
  {
    manualClick = true; 
    PlayButton.innerHTML="Play"; 
  }

RotatingPicturesLoop()}




// add our function to the SharePoint OnLoad event
_spBodyOnLoadFunctionNames.push("RotatingPictures"); 

</script>




<!-- add your own formatting here... -->
<center>
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td id="VU" height="125" width="160" align="center" valign="middle">
<a name="RotatingImageLnk" id="RotatingImageLnk" alt="click for larger picture">
        <img src="/_layouts/images/dot.gif" name="RotatingImage" id="RotatingImage" border=0>
</a>
        <span name="RotatingImageMsg" id="RotatingImageMsg"></span>
      </td>
      <td ID="customTextTD" name="customTextTD"  width="100%" style="padding: 4px 1ex 4px 4px;">
         <span name="RotatingImageText" id="RotatingImageText"></span>
      </td>
    </tr>
    <tr id="buttonRow" style="display:none"><td colspan="2" align="left">
      <a href="" onclick="moveFirst();return false;">First</a>
      <a href="" onclick="movePrev();return false;">Previous</a>
      <a href="" onclick="movePlay();return false;" name="PlayButton" ID="PlayButton">Play</a>
      <a href="" onclick="moveNext();return false;">Next</a>
      <a href="" onclick="moveLast();return false;">Last</a>
    </td></tr>
  </table>
</center>

 

 

 

.

5/27/2010

SharePoint 2010: Developer Dashboard Notes

 

If you have not seen the Developer Dashboard, then go GoogleBing it now. While working with it I found a few interesting issues… so what follows are miscellaneous notes that may help someone in the future.

The Dashboard is enabled using:

  • STSADM
  • PowerShell
  • or code

 

STSADM

STSADM is going away! PowerShell is the new admin tool… but that said, they did ship STSADM with SP 2010 and it can be used to enable the Developer Dashboard.

While the Dashboard can be enabled with STSADM, it is not listed in help! (“stsadm -help setproperty”  does not list it!)  So you will need to make note of the syntax or bookmark the TechNet page.  Speaking of which, I can’t find a page on TechNet or MSDN that officially documents this option. It does get mention in a few places, like here: http://msdn.microsoft.com/en-us/library/ff512745.aspx

Here’s what I can find:

   stsadm -o setproperty -pn developer-dashboard -pv on

   stsadm -o setproperty -pn developer-dashboard -pv off

   stsadm -o setproperty -pn developer-dashboard -pv ondemand

 

PowerShell

The “Official” example here shows this PowerShell example:

    (Get-SPFarm).PerformanceMonitor.DeveloperDashboardLevel = ”On”

Only thing is… it does not work.  (Maybe it worked in one of the betas)

Here is a good discussion about the feature, and how to create your own cmdlet for the Dashboard:
http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=189

 

Here’s the PowerShell command from that blog article:

$dash = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;

$dash.DisplayLevel = 'OnDemand';

$dash.TraceEnabled = $true;

$dash.Update()

 

(a lot to type, so create your own script or follow the blog article above to create a cmdlet)

Note: The SPWebService in the command above is not a “Web Services” reference. SPWebService is part of the hierarchy of SharePoint:   Farm –> Service –> Application –> Site Collection –> Web –> lists, etc.  SPWebService is one of many SharePoint “services”. SPWebService is responsible for the rendering of web pages.

 

Code

Here’s a C# example of turning the Dashboard on:

SPWebService ws = SPWebService.ContentService;
ws.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.OnDemand;
ws.DeveloperDashboardSettings.TraceEnabled = true;  //optional, but pretty cool (try it!)
ws.DeveloperDashboardSettings.Update();

 

DeveloperDashboardSettings

The DeveloperDashboardSettings is an interesting object. Here’s some of the methods and properties:

Methods:

  • DisableDiagnosticMode
  • EnableDiagnosticMode

Properties (and their defaults)

  • DisplayLevel                                  : Off
  • TraceEnabled                                : False
  • AutoLaunchEnabled                     :  False
  • RequiredPermissions                  : AddAndCustomizePages
  • MaximumSQLQueriesToTrack    : 50
  • MaximumCriticalEventsToTrack  : 50
  • AdditionalEventsToTrack              : {}

 

Instead of duplicating what someone else has done an excellent job of, I’ll list the few things above as a teaser and then refer you to this blog article by Geoff Varosky:
    http://gvaro.spaces.live.com/blog/cns!B06529FD3FC75473!928.entry?sa=54522551

 

.

 

Developer Dashboard Test 1

Developer Dashboard Test 2

Developer Dashboard Test 3

Developer Dashboard Test 4

Developer Dashboard Test 5

SharePoint 2010: Windows Explorer View is Gone!

Updated 8/5/10

 

Not new news, and for some people, “good riddance”, but as I had a question about it this week…

 

SharePoint 2010 has a replacement for the Windows Explorer View, and the old Upload Multiple (sort of… see “Mileage may vary” below) is also gone.  But drag and drop is not gone. Both options have both been replaced with a new Upload Multiple option that supports drag and drop from Windows Explorer into the browser.

Actually the Explorer View is still there, but you many not want to use it after you have seen the new “multiple upload”.  Here’s the new place to find Open with Explorer:

image

 

The Open with Explorer and the new Upload Multiple seems to depend on Office 2010 being installed. (For example, if you have Office 64 bit or Internet Explorer 64 bit, a number of Office integration options will not currently work.)

 

The new Upload Multiple

From a document library click the Documents tab, click the dropdown arrow next to “Upload Document” then click “Upload Multiple Documents”.  (or click Upload Document, then click Upload Multiple

   image 

 

A dialog box will open with a “drag area”.

image

Note: Prior to dragging files, the Cancel button cancels the dialog box. After you drop a file, the cancel button is grayed out. Going forward it is used to only cancel an upload in progress.  To close the dialog box you will need to click the “X”.

 

After displaying the above screen you can open a Windows Explorer and then drag files and folders to the browser. What’s interesting is that does not start the upload. It only displays a list of files and lets you remove any you don’t want to upload.

image

 

Then when you click OK it starts the upload with nice progress indicators.

image

 

 

If your library has folders, then the dialog will let you select a folder to upload to:

image

 

Microsoft did leave something behind that I did wanted changed… the default checked “Overwrite existing files”.  (Let me translate that as “Overwrite existing files” means “Overwrite files created by coworkers who have invested hours, days, weeks in other documents that just happen to have the same name are your documents and don’t warn me that I’m about to destroy them”.)  To see one way to fix that little problem see: http://techtrainingnotes.blogspot.com/2010/02/sharepoint-prevent-accidental.html

 

Your mileage my vary…

Or in other words… you may see something other than the above!

(For browser compatibility info see here: http://technet.microsoft.com/en-us/library/cc263526.aspx)

When using Firefox you may get this option when trying to get to Upload Multiple Documents:

image

The link above refers to a “Microsoft Office 2010 Firefox Plug-in", but I’ve not found it yet. All web searches for it return the same Microsoft link, or links with copies of that article. If you know where to find this, post a response to this blog and share!  I’ve heard that FireFox 4 might fix this… (now in beta)

 

Or from from IE 7… I’m not sure yet if this is because or IE 7 or because the machine it was running on (Vista and Office 2007).  This just happens to be the old 2007 upload multiple!

image

 

Can you still get to the Explorer View?

If you have Office or IE 64 bit installed you may not find the new multiple upload, or the link in the ribbon to the Windows Explorer View (image ).  You still may be able to get to the Windows Explorer view of SharePoint… Maybe… Open Windows Explorer from the desktop and enter a server style path to your library. It all depends on your network setup.

URL:  http://intranet/sites/demo/Shared%20Documents/Forms/AllItems.aspx

Path: \\intranet\sites\demo\Shared Documents

Basically, remove the “http:”, change all “/” to “\”, replace all escaped characters with their normal characters (“%20” for example, is a space) and remove references to ASPX pages.

URL:  http:  //intranet/sites/demo/ Shared%20Documents   /Forms/AllItems.aspx

Path:        \\intranet\sites\demo\ Shared Documents

 

image

 

.

5/25/2010

SharePoint 2010: Part 5: Preparing for 70-573 TS Microsoft SharePoint 2010, Application Development

(Start here: http://techtrainingnotes.blogspot.com/2010/05/sharepoint-2010-preparing-for-70-573-ts.html)

 

Wow! Workflows, custom SPD workflow actions, event receivers, timer jobs, BCS and ECM to boot… all in one section and it only represents 19% of the exam!  Sounds like it should be an exam all by itself.

(The workflow section refers to something called “inititation data” and “corelation tokens”, but I think I study up on “initiation data” and “correlation tokens”.)

 

Good news for experienced SharePoint 2007 developers… the core object model and techniques has not changed in these topics too much. But, there are new tools and a number of new features.  So don’t panic. Run though what you do know, but with Visual Studio 2010 (and the VS deploy wizards) and SP 2010, then take a look at what’s new, especially BDC.

 

Skills Being Measured:
Developing Business Logic (19%)

Implement a custom workflow in Visual Studio 2010

  • This objective may include but is not limited to: work with inititation data or association data to create a SharePoint task, extend a workflow imported from SharePoint Designer 2010, use a HandleExternalEvent and CallExternalMethod to interact with a custom local service, work with inititation data or association data in a site workflow, corelation token
  • This objective does not include: trivial cases such as workflows with no custom actions, initiation data, association data.

Create a custom workflow action

  • This objective may include but is not limited to: create a custom SPD action, create and add a custom activity to a Visual Studio workflow, define an action.xml file

Create and implement event receivers

  • This objective may include but is not limited to: accessing event properties, list, item, site, email, avoiding recursion, cancelling events, choosing synchronization state

Customize Enterprise Content Management (ECM)

  • This objective may include but is not limited to: creating a content type that inherit from appropriate parent, creating and implementing a custom publishing field control that is page mode aware, activating a master page programmatically including token usage
  • This objective does not include: page layouts, formatting

Create, implement and debug a Timer Job

  • This objective may include but is not limited to: configuration, programmatic scheduling, queuing, attaching debugger to the Timer service

Create and modify Business Connectivity Service model in Visual Studio 2010

  • This objective may include but is not limited to: create a BDC model in Visual Studio 2010, define insert, update and delete methods, create and read items, make data searchable

Manage Users, Groups, Permissions

  • This objective may include but is not limited to: SPGroups, SPUser, permission inheritance, all securable objects, SPRoleDefinition, SPRole, SPRoleAssignment

 

Notes:

 

Workflow

If you have not worked with SharePoint 3.0 workflows go and find any of the good books or online tutorials and videos.  Then start here: http://msdn.microsoft.com/en-us/library/ee537015.aspx

What’s new in 2010?

  • New activities/actions
  • Site workflows (in addition to list workflows)
  • New tools in Visual Studio 2010, including ASPX association and initiation forms
  • Import from SharePoint Designer 2010
  • Major changes in how SharePoint Designer creates workflows (the Skills Measured list does not include creating SPD workflows, but does include importing them, so you will need to know a little about creating them!)

So… here's the things you need to know (or at least my first guesses!) …

 

Custom workflow actions (for SPD):

  • Does not appear to have really changed from SP 2007
  • Create an activity for Visual Studio workflows, create a .actions file, then update web.config

Event receivers:

  • New places to use event handlers… see here and here
  • Largely the same as 2007
  • New templates/wizards in Visual Studio 2010

ECM, Content Types, custom publishing fields, master pages:

  • I think I got the master page topic covered in my prep in Part 4.
  • New templates/wizards in Visual Studio 2010

Timer jobs:

  • New ways to manage timer jobs in Central Administration and PowerShell
  • Know about scheduling and OWSTIMER.EXE

BCS:

  • BCS tools in Visual Studio
  • Now part of SharePoint Foundation (BDC was part of MOSS Enterprise)
  • Supports caching and offline
  • CRUD – Create, Read, Update, Delete
  • External lists
  • Now support BLOBs
  • SharePoint Designer support to create external lists
  • See the BCS Resource Center for lots of useful content, videos, articles

 

Users, Groups, Permissions:

  • Other than a small change to SPAlert (email vs SMS), the object model looks the same as for 2007.

 

Links:

Note: Many of these links include a link to the 2007 version of the documentation, so also check the 2007 version for “Community Comments”.

  • Workflows

MSDN: What's New: Workflow Enhancements
http://msdn.microsoft.com/en-us/library/ee537015.aspx

MSDN: Workflows in SharePoint Server 2010
http://msdn.microsoft.com/en-us/library/ms549489.aspx

MSDN: Workflow Development for SharePoint Foundation
http://msdn.microsoft.com/en-us/library/ms414613.aspx 

MSDN: Correlation Tokens in Workflows
http://msdn.microsoft.com/en-us/library/ms475438.aspx

  • Custom Workflow Actions

Make a Custom Activity available to SharePoint Designer 2010
http://www.chaholl.com/archive/2010/03/13/make-a-custom-activity-available-to-sharepoint-designer-2010.aspx

Walkthrough: Create a Custom Site Workflow Activity
http://msdn.microsoft.com/en-us/library/ee231574.aspx

  • Event Receivers

New Event Handlers in SharePoint 2010
http://philwicklund.com/archive/2009/10/20/new-event-handlers-in-sharepoint-2010.aspx

MSDN: Event Receiver Methods Compared: Windows SharePoint Services 3.0 and SharePoint Foundation 2010
http://msdn.microsoft.com/en-us/library/ff407299.aspx

How to: Create an Event Receiver
http://msdn.microsoft.com/en-us/library/ee231563.aspx

Example: Creating a List Item Event Handler
http://msdn.microsoft.com/en-us/library/ms437502.aspx

How to: Create an Event Receiver for a Specific List Instance
http://msdn.microsoft.com/en-us/library/ff398052.aspx

  • Timer Jobs

Creating Custom Timer Jobs in Windows SharePoint Services 3.0
(2007) http://msdn.microsoft.com/en-us/library/cc406686%28office.12%29.aspx

  • BCS

MSDN: Microsoft Business Connectivity Services
http://msdn.microsoft.com/en-us/library/ee556826.aspx

Sharepoint 2010 BCS new features
http://mikeren.wordpress.com/2010/03/22/sharepoint-2010-bcs-new-features/

First steps on the SharePoint 2010 BCS path
http://bloggingabout.net/blogs/jpsmit/archive/2010/02/12/first-steps-on-the-sharepoint-2010-bcs-path.aspx

Using Business Connectivity Services(BCS) In SharePoint 2010 For Connecting To MS CRM 4.0
http://malikhan.wordpress.com/2010/01/24/using-business-connectivity-servicesbcs-in-sharepoint-2010-for-connecting-to-ms-crm-4-0/

SP 2010: Getting started with Business Connectivity Services (BCS) in SharePoint 2010
http://www.zimmergren.net/archive/2010/01/18/sp-2010-getting-started-with-business-connectivity-services-bcs-in-sharepoint-2010.aspx

MSDN: BCS Resource Center | SharePoint 2010
http://msdn.microsoft.com/en-us/sharepoint/ff660755.aspx

  • Manage Users, Groups, Permissions

Overview of SharePoint security and securable objects: Plan site permissions (SharePoint Server 2010)
http://technet.microsoft.com/en-us/library/cc262778.aspx

Overview of SharePoint security and securable objects: Plan site permissions (SharePoint Foundation 2010)
http://technet.microsoft.com/en-us/library/cc287752.aspx


How-to’s, Tutorials, etc.

 

HOL07 - Developing a SharePoint 2010 Workflow with Initiation Form in Visual Studio 2010
http://www.microsoft.com/downloads/details.aspx?FamilyID=c010fc68-b47f-4db6-b8a8-ad4ba33a35c5&displaylang=en

Module 7: Developing Business Processes with SharePoint 2010 Workflows
http://msdn.microsoft.com/en-us/sharepoint/ee513154.aspx

Overview: Creating Workflows with SharePoint Designer 2010, InfoPath 2010 and Visio 2010
http://channel9.msdn.com/posts/matthijs/Overview-Creating-Workflows-with-SharePoint-Designer-2010-InfoPath-2010-and-Visio-2010/

Integrating SharePoint 2010 Workflows into Backend Systems Using External Data Exchange Services
http://channel9.msdn.com/posts/matthijs/Integrating-SharePoint-2010-Workflows-into-Backend-Systems-Using-External-Data-Exchange-Services/ 

 

Video: How Do I: Create Event Receivers for SharePoint 2010 in Visual Studio 2010?
http://msdn.microsoft.com/en-us/vcsharp/ff623003.aspx

 

 

.

5/24/2010

SharePoint 2010: Part 4: Preparing for 70-573 TS Microsoft SharePoint 2010, Application Development

 

Web parts are cool… Ask someone to name five features of SharePoint and they will almost always mention web parts. And the best thing, most of what you need to know about web parts is how to create ASP.NET 2.0 web parts.

 

Skills Being Measured:
Developing Web Parts and Controls (21%)

Create Web Parts

  • This objective may include but is not limited to: including properties, controls using Render vs. CreateChildControl, life cycle,  visual, standard Web Parts,  
  • This objective does not include: trivial case where developer uses Visual Web Part project template

Create connectable Web Parts

  • This objective may include but is not limited to: Implement consumer/provider interfaces

Debug Web Parts

  • This objective may include but is not limited to: ULS log, and event log, debug.log tracing, developer dashboard

Create and implement delegate controls

  • This objective may include but is not limited to: overriding existing controls with lower sequence, developing and using .ascx files

 

Notes:

 

Web Parts in General

If you have not worked with web parts before go and find any of the good books or online tutorials and videos on SharePoint 2007 web parts. Maybe start with this book: Inside Microsoft Windows SharePoint Services 3.0  or attend a good SharePoint 2007 or 2007/2010 dev class (like mine!).

What’s new in 2010?

  • Visual Web Parts
  • Debugging info from the Developer Dashboard
  • Using the templates and deploy options in Visual Studio 2010
  • Sandboxed Solutions (several web part restrictions)

Web Part Notes:

  • Know how to write code for custom connection interfaces, and the SharePoint interfaces
  • Know the difference between, and when you would use, System.Web.UI.WebControls.WebParts.WebPart (recommended) or Microsoft.SharePoint.WebPartPages.WebPart (mostly for backward compatibility)
  • Know what can be used in Sandboxed Solutions
    • Visual Web Parts = no
    • Microsoft.SharePoint.WebPartPages.WebPart = no
    • No Web Part connections
    • Asynchronous postbacks in Web Parts in sandboxed solutions are not supported and will not function
    • must have the AllowPartiallyTrustedCallers attribute set at the assembly level
  • Know how to deploy a web part as a Feature and as a Solution
  • Know all about Safe Controls
  • Know how to deploy using Visual Studio 2010 and how to manually deploy
  • Debugging
    • Debugging from Visual Studio on a local machine
    • Debugging from Visual Studio on a remote server
    • How to enable (and disable) the Developer Dashboard (STSADM, PowerShell and code)
    • Know where SharePoint logs things: Windows Event Logs, …\14\LOGS

Delegate Controls:

  • Basically a SharePoint control (<SharePoint:DelegateControl …/>) and a .Net user control ( *.ascx )
  • Need to know:
    • How to add SharePoint:DelegateControl to a page or a master page
    • How to deploy an ASCX control to ..\14\TEMPLATE\CONTROLS
    • How to associate an ASCX control to a DelegateControl (a Feature!)
    • How to declare a Safe Control in the web.config

 

Links:

Note: Many of these links include a link to the 2007 version of the documentation, so also check the 2007 version for “Community Comments”.

  • Web parts

MSDN: Web Parts in SharePoint Foundation
http://msdn.microsoft.com/en-us/library/ms476318.aspx

MSDN: System.Web.UI.WebControls.WebParts.WebPart
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.webpart.aspx

MSDN: Microsoft.SharePoint.WebPartPages
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.webpart.aspx

MSDN: AllowPartiallyTrustedCallersAttribute Class
http://msdn.microsoft.com/en-us/library/system.security.allowpartiallytrustedcallersattribute%28VS.90%29.aspx

  • Logging and Debugging

MSDN: What's New In Logging for SharePoint Foundation 2010
http://msdn.microsoft.com/es-es/library/ee535240.aspx

MSDN: Using the Developer Dashboard
http://msdn.microsoft.com/es-es/library/ff512745.aspx

MSDN: Using SPMonitoredScope
http://msdn.microsoft.com/en-us/library/ff512758.aspx

MSDN: Logging For SharePoint Developers
http://msdn.microsoft.com/en-us/library/ee535537.aspx

MSDN: Overview of Unified Logging System (ULS) Logging
http://msdn.microsoft.com/en-us/library/ff512738.aspx

  • Delegate Control

(2007)  MSDN: Delegate Control
http://msdn.microsoft.com/en-us/library/bb861966%28office.12%29.aspx

MSDN: Delegate Control
http://msdn.microsoft.com/en-us/library/ms463169.aspx

MSDN: DelegateControl Class
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.delegatecontrol.aspx

 

 

How-to’s, Tutorials, etc.

 

Video: Module 1: Getting Started: Building Web Parts in SharePoint 2010
http://msdn.microsoft.com/en-us/sharepoint/ee513148.aspx

Video: Best Practices on Building SharePoint 2010 Web Parts with Visual Studio 2010
http://channel9.msdn.com/posts/funkyonex/Best-Practices-on-Building-SharePoint-2010-Web-Parts-with-Visual-Studio-2010/

Video: Advanced Web Part Development in SharePoint 2010 
http://channel9.msdn.com/posts/matthijs/Advanced-Web-Part-Development-in-SharePoint-2010/

Connect Web Parts in SharePoint 2010
http://msdn.microsoft.com/en-us/library/ff597538.aspx

Create Visual Web Parts for SharePoint 2010
http://msdn.microsoft.com/en-us/library/ff597539.aspx

 

How to: Customize a Delegate Control
http://msdn.microsoft.com/en-us/library/ms470880.aspx

 

.

SharePoint 2010: Part 3: Preparing for 70-573 TS Microsoft SharePoint 2010, Application Development

 

Time for some UI work (other than the ribbon!). Navigation, Master Pages, Themes and other goodies…

 

Skills Being Measured:
Working with the SharePoint User Interface (19%)(continued…)

Customize navigation programmatically

  • This objective may include but is not limited to: TopNav bar, quick launch, custom actions
  • This objective does not include: custom menu controls, custom site map providers

Create and apply branding to a SharePoint site

  • This objective may include but is not limited to: applying custom master pages to content pages and application pages, placeholders, page layouts, programmatically working with themes, deploying CSS, CSSlink, ScriptLink
  • This objective does not include: graphic design, creating a CSS

 

Notes:

Customize Navigation

  • The “Customize navigation” section does not mention the objects, so my guess is:
    • SPWeb.Navigation
    • SPNavigation   (what is returned from SPWeb.Navigation)
    • SPNavigation,QuickLaunch
    • SPNavigation.TopNavigationBar
    • SPNavigationNodeCollection   (top link bar or Quick Launch)
    • SPNavigationProvider   (WSS / non-publishing sites)
    • PortalSiteMapProvider  (MOSS / publishing sites)
    • and maybe something on the SiteMapPath, TreeView and Menu controls
  • Notice the reference to Custom Actions – this most likely is everything navigation related that is not the Ribbon (covered by a previous topic), so mostly the 2007 type options

Branding

Very broad topic here… so the following are some guesses of what you should know:

  • @Page directive and the MasterPageFile option, and know which events it can be set in (not PageLoad!)
  • What has changed with Application pages and Master Pages
  • How the tokens like “~masterurl/custom.master” and “~masterurl/custom.master” work
  • How the placeholders work in master pages / content pages
  • How page layouts work, how the are stored and how to create one with VS 2010
  • How themes have changed from 2007
  • How to use a theme from PowerPoint in SharePoint 2010
  • The ThmxTheme Class
  • Controls;
    • CSSLink  - CSSLink class and <SharePoint:CssLink runat="server"/>
    • Options to deploy CSS files
    • ScriptLink – ScriptLink class and <SharePoint:ScriptLink … /> and probably something about “OnDemand=” and client side scripting in general
    • How <SharePoint:Theme runat="server"/> works

 

Links:

 

Note: Many of these links include a link to the 2007 version of the documentation, so also check the 2007 version for “Community Comments”.

MSDN: SPWeb.Naviagation
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.navigation.aspx

MSDN: SPNavigation
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.navigation.spnavigation.aspx

MSDN: SPNavigationNodeCollection  
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.navigation.spnavigationnodecollection.aspx

MSDN: SPNavigationProvider
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.navigation.spnavigationprovider.aspx

MSDN: PortalSiteMapProvider
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.aspx

MSDN: ASP.Net Master pages
http://msdn.microsoft.com/en-us/library/ms443795.aspx

MSDN: SharePoint Masterpages
http://msdn.microsoft.com/en-us/library/ms443795.aspx

MSDN: Page.MasterPageFile
http://msdn.microsoft.com/en-us/library/system.web.ui.page.masterpagefile.aspx

CodePlex:Changing Master Page at Runtime
http://www.codeproject.com/KB/aspnet/Changing_Master_Page.aspx

MSDN: CSSLink
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.csslink.aspx

MSDN: MasterPageFile
http://msdn.microsoft.com/en-us/library/system.web.ui.page.masterpagefile%28VS.90%29.aspx

MSDN: Master page tokens
http://msdn.microsoft.com/en-us/library/ms476046%28office.12%29.aspx

MSDN: SharePoint Foundation master page placeholders
http://msdn.microsoft.com/en-us/library/ee539981.aspx

Creating a Page Layout in SharePoint 2010 using Visual Studio 2010
http://blog.beckybertram.com/Lists/Posts/Post.aspx?ID=71

SharePoint 2010 Themes and Resources for Upgrading a Custom Master Page
http://www.sharepointjoel.com/Lists/Posts/Post.aspx?ID=338

TechNet: Themes Overview
http://technet.microsoft.com/en-us/library/ee424397.aspx

How Themes work in SharePoint 2010
http://www.sharepointbits.com/blog/2010/1/4/how-themes-work-in-sharepoint-2010.html

ThmxTheme Class
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.thmxtheme.aspx

Getting and Setting SharePoint 2010 Themes using code
http://www.spdavid.com/post/2010/01/17/Getting-and-Setting-SharePoint-2010-Themes-using-code.aspx

 

How-to’s, Tutorials, etc.

 

How to: Add Simple Site Navigation (ASP.NET SiteMapPath, TreeView and Menu controls)
http://msdn.microsoft.com/en-us/library/ms178418%28VS.90%29.aspx

(2007) MOSS Navigation Deep-Dive - Part 1 & 2
http://blogs.msdn.com/ecm/archive/2007/02/10/moss-navigation-deep-dive-part-1.aspx
http://blogs.msdn.com/ecm/archive/2007/02/16/moss-navigation-deep-dive-part-2.aspx

 

.

5/23/2010

SharePoint: Customizing the Basic Page

This article is for SharePoint 2007

 

I have yet to find anyone who really likes the Basic Page.  This is the page you get from “Site Actions, Create, Basic Page”. This page is easy to use, is stored in a library (and can support check in/out, content approval and versioning) and ugly.

This is how it looks when your first edit it:

image

The areas in red are the most often I asked about.

 

Tips in this article:

  • Hide the site description
  • Hide the blue bar
  • Selectively hide things
  • Add Quick Launch to the Basic Page

All of the following requires the use of SharePoint Designer, therefore Owner or Designer rights to the site or the library. If you really mess up… remember you can click on the file name in SharePoint Designer and select “Reset to Site Definition”.

 

Getting rid of the Site Description

The first thing you may want to get rid of is the oddly placed Site Description.

Before:

        image

You could just go to Site Actions, Site Settings, Title Description and Icon and remove it there, but that removes it from all pages, AND from search indexing.

  • Open the page in SharePoint Designer
  • Find the “PlaceHolderPageDescription” placeholder
  • Either delete the entire placeholder or delete the SharePoint:ProjectProperty control inside of the placeholder
<asp:Content ContentPlaceHolderId="PlaceHolderPageDescription" runat="server">    <SharePoint:ProjectProperty Property="Description" runat="server"/></asp:Content>
After:
        image
 

Getting rid of the “big blue bar”

Method #1:

Hide the blue area, but keep the crumb trail.

  • Find the following area
    <style>
    Div.ms-titleareaframe {
        height: 100%;
    }
    .ms-pagetitleareaframe table {
        background: none;
    }
    </style>
  • And change it to:
    <style>
    Div.ms-titleareaframe {
        height: 100%;
    }
    .ms-pagetitleareaframe table {
        background: none;
        height:25px;
    }
    #onetidPageTitle
    {
        display:none
    }    
    </style>

 

Result:

        image

And add the change to get rid of the site description and you get:

        image

 

But the edit link is now gone… how do you edit it?

To edit just add
    “?PageView=Shared&ContentEditorPopUp=True”
to the end of the URL.

I.e.: http://yourserver/sites/yoursite/Shared%20Documents/Sample%20Basic%20Page.aspx?PageView=Shared&ContentEditorPopUp=True

 

If you want to only make the changes above for selected users then replace the style block above with the following.  See “Method 3” below for some more info on the SPSecurityTrimmedControl.

    <style>
    Div.ms-titleareaframe {
        height: 100%;
    }
    .ms-pagetitleareaframe table {
        background: none;
        height:25px;
    }
    #onetidPageTitle
    {
        display:none
    }    
    </style>

    <Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManageWeb">
    <style>
    .ms-pagetitleareaframe table {
        height:53px;
    }
    #onetidPageTitle
    {
        display:inline
    }    
    </style>
    </SharePoint:SPSecurityTrimmedControl>

 

Method #2:

Hide the blue bar AND the crumb trail:

  • Open the page in SharePoint Designer
  • Find the “PlaceHolderAdditionalPageHead” placeholder
  • Add “display:none” to the “.ms-pagetitleareaframe” section  (see line 17 below)
   1:  <asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
   2:      <META Name="GENERATOR" Content="Microsoft SharePoint">
   3:      <META Name="ProgId" Content="SharePoint.WebPartPage.Document">
   4:      <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
   5:      <META Name="CollaborationServer" Content="SharePoint Team Web Site">
   6:      <script>
   7:      var navBarHelpOverrideKey = "wssmain";
   8:      </script>
   9:      <SharePoint:RssLink runat="server"/>
  10:      <SharePoint:ScriptLink language="javascript" name="bpstd.js" runat="server"/>
  11:      <style>
  12:      Div.ms-titleareaframe {
  13:          height: 100%;
  14:      }
  15:      .ms-pagetitleareaframe table {
  16:          background: none;
  17:          display:none;
  18:      }
  19:      </style>
  20:  </asp:Content>

 

After:

        image

Looks good, but we lost the crumb trail and… how do you edit it?

To edit just add
    “?PageView=Shared&ContentEditorPopUp=True”
to the end of the URL.

I.e.: http://yourserver/sites/yoursite/Shared%20Documents/Sample%20Basic%20Page.aspx?PageView=Shared&ContentEditorPopUp=True

 

Method #3

Hide the blue bar and the crumb trail from “some” users, based on user permissions.

  • Make the change as above to hide the blue bar (line 17)
  • Add a SPSecurityTrimmedControl to use a custom CSS for selected users (by permission) (lines 21-27)
  • Set “PermissionsString="ManageWeb"” to one of the SharePoint 32 permissions (see the comments at the end of the page here)
   1:  <asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
   2:      <META Name="GENERATOR" Content="Microsoft SharePoint">
   3:      <META Name="ProgId" Content="SharePoint.WebPartPage.Document">
   4:      <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
   5:      <META Name="CollaborationServer" Content="SharePoint Team Web Site">
   6:      <script>
   7:      var navBarHelpOverrideKey = "wssmain";
   8:      </script>
   9:      <SharePoint:RssLink runat="server"/>
  10:      <SharePoint:ScriptLink language="javascript" name="bpstd.js" runat="server"/>
  11:      <style>
  12:      Div.ms-titleareaframe {
  13:          height: 100%;
  14:      }
  15:      .ms-pagetitleareaframe table {
  16:          background: none;
  17:          display:none;
  18:      }
  19:      </style>
  20:      
  21:      <Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManageWeb">
  22:      <style>
  23:      .ms-pagetitleareaframe table {
  24:      display:inline;
  25:      }
  26:      </style>
  27:      </SharePoint:SPSecurityTrimmedControl>
  28:   
  29:  </asp:Content>

This first example below is displayed for users without “ManageWeb” (site owner) rights. The second example is for those with “ManageWeb”.

       image   
       image  

 

Bonus!  Add Quick Launch!

The basic page does not include Quick Launch, sometimes that is desired, but removing it does break basic site navigation.

  • Using SharePoint Designer find and delete the following two lines:
<asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server"></asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderNavSpacer" runat="server"></asp:Content

 

.

5/20/2010

SharePoint 2010 SDK download now available

5/20/10

 

The Software Development Kit contains documentation and code samples for Microsoft SharePoint Foundation 2010 and for Microsoft SharePoint Server 2010. “The SDK also includes many code samples that address common customization scenarios and solution building blocks.”

 

The online SDK is here:

http://msdn.microsoft.com/en-us/library/ee557253.aspx

 

The downloadable SDK is here:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=f0c9daf3-4c54-45ed-9bde-7b4d83a8f26f

 

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.