Tuesday, August 7, 2007

Adoption of SharePoint

This post is more in and around business analysis and adoption of SharePoint.  Business units typically know they need some type of communication and collaboration tool (or an upgrade to an existing one), but have no idea what to ask for or how to get there.  If SharePoint is just thrown up with no input from the End-Users you will typically have a very low rate of adoption.  If the lines of business are included in the process they are more apt to use the solution once implemented.  The following is a partial set of questions that I have found very useful when attempting to extract this information from lines of business. 




  1. What functionality exists in the current solution (if one exists) that you need in the new SharePoint solution?

  2. Explain Metadata and how it works for organization and search.  What categories make sense for metadata? (i.e. Risk Management might have: Claim Loss Reporting, Contractor Services, Emergency Assistance, Insurance, Risk Management Services and Travel Related Services)

  3. Is a private departmental site needed with corresponding rights for storing sensitive data?

  4. How many people can: add new content, change content or delete content? (Contributors)  Who are they?  Will content require approval?

  5. How do they handle document versioning?  If versioning is to be used, how many major and minor versions should be stored?

  6. Do they have an established workflow for document submission / approval?  Is this a manual process that can be changed into an automated one with workflow?

  7. Have they thought about Site Administration? - someone needs to Administer the site

  8. Do they have any look and feel requirements?  Decide whether they will have the ability to change the look and feel or if a standard is going to be used from the top down.

  9. Are there any standards that they have to conform to?

  10. Is there a committee or someone controlling the content / look and feel?

  11. Do they need any Managerial or Operational Statistics displayed on the site (i.e. KPIs)?


As I said before this is just a partial list.  Feel free to submit your own ideas.


Jeff


 

Thursday, July 26, 2007

Display CSS Classes within SharePoint

I'm posting this just because I'm getting tired of losing the script... This is a great script written by Microsoft to reveal CSS classes within SharePoint.


Taken from: (http://msdn2.microsoft.com/en-us/library/ms438349.aspx)


<script language="jscript">
function ClassInfo()
{
    if (window.event.srcElement.className != null)
    {
        stsclass.innerText = window.event.srcElement.className;
    }
    else
    {
        stsclass.innerText = "";
    }
}
 
window.document.body.onmouseover = ClassInfo;</script>
 
<div style="border-style:solid;border-width:1px; width: 281px; height: 34px;
position: absolute; left: 286px; top: 41px; z-index:15; padding-left:4px;
padding-right:4px; padding-top:2px; padding-bottom:2px; background-color:#EEEEF4">
<p id="stsclasstitle"><font face="Tahoma" id="stsclasstitle">Classname: </font>
<font face="Tahoma"id="stsclass">&#xa0;</font>
</p></div>


Microsoft mentions including this within a ASPX page.  Why mess with that?  Just create a content editor web part, open the source editor, and paste the above code in.



You will notice that the CSS codes now appear in the top middle-left of the screen as you scroll over the SharePoint page.



If you wish to change the location of the box displaying the codes just alter the following to suite your needs: position: absolute; left: 286px; top: 41px; z-index:15


The following example shows it changed to: position: absolute; left: 100px; top: 0px; z-index:15



This will help to alleviate some of the branding stress when you are ready to pull your hair out.  Always remember to check Heather Solomon's GREAT CSS Reference Chart as well: http://www.heathersolomon.com/content/sp07cssreference.htm


 

Creating a New Document Template

When multiple content types are used, Document Templates are managed one per content type.  The following steps walk through uploading a new document template for a content type and assigning it to a document library.



  1. Go to Site Actions Site Settings Modify All Site Settings.

  2. Click on Site Content Types under Galleries.

  3. Click on the Content Type that is to be changed.

  4. Click on Advanced Settings under Settings.

  5. Choose to upload a new document template and browse out and select the file.  Click Ok to save changes.
    Step 5

  6. If the content type has not been added to the document library, browse to the Document Library where the Content Type will be used and go to the settings of the library.
    Step 6

  7. Select to Add from existing site content types under Content Types.
    Step 7

  8. Add the content type and click Ok.
    Step 8

  9. Browse back to the document library.  The new document template associated with the added content type now appears under the New Button.
    Step 9

 

Delete Files with Workflow Using Duration

This is just a quick little tidbit.  Out-of-Box workflows in MOSS, unless manually kicked off, require an event to be triggered.  I was trying to figure out a way to automatically delete files from a document library 3 days after they were uploaded.  The doc library was being used strictly as a transfer point and needed to be kept clean.  Thanks to Sean S. for the idea...


So as simple as it is:


1.       Start a new workflow using SharePoint Designer by going to File -> New -> Workflow.


2.       Give the Workflow a name and select the target doc library or list.



3.       Set the start event.  I set mine to automatically start when the item is created or changed.  Click Next.


4.       Enter a name for Step 1 such as `Pause for 3 days'


5.       Do not select a condition because we want it applied to all items.


6.       Under Actions select `Pause for duration'.



7.       Change to 3 days, 0 hours, and 0 minutes.



8.       On the right choose to `Add workflow step'


9.       Once again, give the step a name and no condition.



10.   Select Delete Item under Actions and set it to Current Item.


11.   Click Finish to save the workflow.


NOTE: A good way to test this first is to set the duration to a low count like 1 minute.  Once you are sure it works properly, set it to your desired time frame.

Tuesday, June 19, 2007

Changing Custom Site Definition Template IDs - SharePoint 2003

The following steps walk through changing custom template IDs so they are greater than 10000 per documented best practices.  Always make sure to backup all databases and files prior to making any changes.


NOTE: Microsoft does not support editing SharePoint SQL tables directly...




  • Make a backup copy of all %programfiles%common filesmicrosoft sharedweb server extensions60Template1033XMLwebtempXXX.xml on all front-end web servers.


  • Open each webtempXXX.xml.  Below is an example webtempXXX.xml file with custom templates.

<Templates>


<Template Name="SPSCONTOSOSERVICES" ID="37">


    <Configuration ID="0" Title="Area Template" Type="0" Hidden="TRUE" ImageUrl="../images/spshome.gif" Description="Contoso Services Template."><!-- _locID@Title="webtemp_title_spstopic0" _locComment="{StringCategory=HTX}" --> <!-- _locID@Description="webtemp_desc_spstopic0" _locComment="{StringCategory=HTX}" --></Configuration>


 </Template>   


 <Template Name="SPSCONTOSOBUSINESSES" ID="38">


    <Configuration ID="0" Title="Contoso Businesses Template" Type="0" Hidden="TRUE" ImageUrl="../images/spshome.gif" Description="Area Template."><!-- _locID@Title="webtemp_title_spstopic0" _locComment="{StringCategory=HTX}" --> <!-- _locID@Description="webtemp_desc_spstopic0" _locComment="{StringCategory=HTX}" --></Configuration>


 </Template>   


 <Template Name="SPSCONTOSOTOPICS" ID="39">


    <Configuration ID="0" Title="Contoso Topics Template" Type="0" Hidden="TRUE" ImageUrl="../images/spshome.gif" Description="Area Template."><!-- _locID@Title="webtemp_title_spstopic0" _locComment="{StringCategory=HTX}" --> <!-- _locID@Description="webtemp_desc_spstopic0" _locComment="{StringCategory=HTX}" --></Configuration>


 </Template>   


</Templates>




  • Replace the IDs with numbers over 10000.  It is easiest just to add a 1 and 0 or 00 in front of the existing template IDs.

<Templates>


<Template Name="SPSCONTOSOSERVICES" ID="10037">


    <Configuration ID="0" Title="Area Template" Type="0" Hidden="TRUE" ImageUrl="../images/spshome.gif" Description="Contoso Services Template."><!-- _locID@Title="webtemp_title_spstopic0" _locComment="{StringCategory=HTX}" --> <!-- _locID@Description="webtemp_desc_spstopic0" _locComment="{StringCategory=HTX}" --></Configuration>


 </Template>   


 <Template Name="SPSCONTOSOBUSINESSES" ID="10038">


    <Configuration ID="0" Title="Contoso Businesses Template" Type="0" Hidden="TRUE" ImageUrl="../images/spshome.gif" Description="Area Template."><!-- _locID@Title="webtemp_title_spstopic0" _locComment="{StringCategory=HTX}" --> <!-- _locID@Description="webtemp_desc_spstopic0" _locComment="{StringCategory=HTX}" --></Configuration>


 </Template>   


 <Template Name="SPSCONTOSOTOPICS" ID="10039">


    <Configuration ID="0" Title="Contoso Topics Template" Type="0" Hidden="TRUE" ImageUrl="../images/spshome.gif" Description="Area Template."><!-- _locID@Title="webtemp_title_spstopic0" _locComment="{StringCategory=HTX}" --> <!-- _locID@Description="webtemp_desc_spstopic0" _locComment="{StringCategory=HTX}" --></Configuration>


 </Template>   


</Templates>




  • Open Query Analyzer on the SQL Backend and perform a query resembling the following on all Content Databases:


update webs set webtemplate = 10038 where webtemplate = 37;


update webs set webtemplate = 10038 where webtemplate = 38;


update webs set webtemplate = 10039 where webtemplate = 39;


GO


Replace the numbers in the query with ones specific to the environment.  These numbers must match the ones included in the webtempXXX.xml file(s).




  • Perform an iisreset /noforce on all front-end servers.


  • Launch the portal to verify that the templates are still working properly.

Restore Production SharePoint 2003 Databases to Test Servers

This entry is designed to walk through the steps needed to backup and restore production SharePoint 2003 databases to test servers.  These steps have worked well for me especially when preparing for a SharePoint 2003 to MOSS 2007 Upgrade.  (This example is based on Microsoft SQL Server 2000.)



  1. In production, backup the primary Inetpub directory used by IIS.
  2. Backup C:Program FilesCommon FilesMicrosoft Sharedweb server extensions60
  3. Copy SQL database backups (typically *.bak files) and the Inetpub and 60 folders to a temporary area on the target test server for use later.
  4. Log out of Production.
  5. Launch `Enterprise Manager' on the target test SQL server.
  6. Expand Microsoft SQL Servers SQL Server Group (local) (Windows NT).  Right click on "Databases" and select "All Tasks" "Restore Database."
  7. Choose "From device".
  8. Click on "Select Devices."
  9. Click on "Add."
  10. Click on the button with the three dots to browse.
  11. Browse to the temporary location where the database backup, Inetpub directory, and 60 directories were copied to from Production.
  12. Select the Profiles database.
  13. Select the name of the database embedded in the backup filename and copy it to the clipboard.
  14. Click `OK' three times.
  15. Paste the name of the database into the "Restore as database:" field.
  16. Click on the options tab.
  17. Set the physical filename and path to the new target destination (i.e. d:MSSQLdata"Servername".mdf and d:MSSQLdata"Servername".ldf.)
  18. Click `OK' to begin restore.
  19. When complete, the following message will appear:
  20. Repeat Steps 6 - 19 for the Services and Sites databases.
  21. Log back into the web front-end.
  22. Shutdown all SharePoint and IIS Services.
  23. Rename or move the existing Inetpub directory on test.
  24. Copy the backed up InetPub directory from Production to the location on test that was moved or renamed.
  25. Rename or move the existing C:Program FilesCommon FilesMicrosoft Sharedweb server extensions60 directory on test.
  26. Copy the backed up 60 directory from Production into test.
  27. Restart the services stopped in Step 22 or just reboot the server.
  28. Open SharePoint Central Administration.
  29. Click on `Create portal site' under `Portal Site and Virtual Server Configuration'.
  30. Choose "Restore a portal".
  31. Set the names of the databases and select "Default Web Site".  Click `OK' to continue.
  32. Click `OK' to begin creation.
  33. A successful creation will cause a message resembling the following to appear:
  34. Click on Go to SharePoint Portal Server central administration.
  35. Click on Configure virtual server settings from the Virtual Server List page.
  36. Click on Default Web Site.
  37. Click on Manage content databases.
  38. Click on Add a content database.
  39. Choose "Specify database server settings" and enter the additional content database name (i.e. DB2_SITE).
  40. Set the number of site before a warning to a high number initially (i.e. 90000).  Set the max number of sites to a high number as well (i.e. 100000).
  41. Click Ok to restore the additional database and attach it to SharePoint.
  42. Repeat for all additional content databases.
  43. Reset IIS.
  44. Reinstall any custom web parts that may not be functioning.