SharePoint Corner


SharePoint 2010 Prompts For Credentials When Opening Office Documents.



Over the past few weeks I have run into and been asked about SharePoint prompting for credentials a bunch of times. There are a number of different reasons this could happen. Most commonly it is because the SharePoint site isn’t in the Trusted Sites or Local Intranet IE security zones. If it is in the Internet zone by default the browser doesn’t pass your credentials along which is a good thing that we don’t what to change. Assuming that your site is in Trusted Sites or the Local Intranet zone then the next thing to check would be whether or not Integrated Windows Authentication is enabled. To do this in IE you click tools, internet options, then the advanced tab and under the security section make sure the checkbox is checked.

SharePoint Prompts for Credentials

If you are still getting prompted at this point. The last setting that seems to do the trick every time is another IE security setting. Go back into Tools –> Internet Options and then the security tab. Once in there click on the zone your site is in, for this example its local intranet. Then click the custom level button and all the way at the bottom of the window that opens up under the User Authentication section make sure that Automatic Logon with current user name and password is selected. Click OK restart the browser and enjoy the no more prompts.



If you have any questions or other suggestions please feel free to leave a comment.


How To Install and Configure PowerPivot for SharePoint 2010


Today we will take a walkthrough on how to install and configure PowerPivot in a SharePoint farm. There are a few requirements to consider before getting started. The first is that you can only install a PowerPivot instance on a sever that has SharePoint 2010 installed. This means that you cannot run the PowerPivot analysis services instance on your SharePoint database server. For this walkthrough I have a Server Farm setup (a farm install is required as PowerPivot cannot work with the standalone install of SharePoint and the internal database) I have an app server in the farm dedicated to reporting services and we will now add the PowerPivot instance onto that server. In order to install PowerPivot you must install with an account that has local admin rights on the server. You also need that account to have farm administrator privileges in order to deploy the solution files. For this example I granted my SharePoint farm admin account local admin rights on the server. I will remove this account from the local admin group after the installation is complete.

OK so lets get started with the install. Get your SQL 2008 R2 media and run as administrator and start the installation.

NOTE: You must use Evaluation, Enterprise, Developer, or Data Center edition of SQL 2008 R2. Other editions do not offer the PowerPivot option.

We are going to do a new installation so click installation and then New installation or add features to an existing installation. Click through the wizard choosing new installation again when prompted. Then on the Setup Role screen you will not accept the default and you select SQL Server PowerPivot for Sharepoint. Then if you already have a SharePoint farm up and running that you would like to configure PowerPivot for you choose existing farm from the drop down box. If you have a fresh install of SharePoint then you select New Server. For this walk through we will be doing existing farm since there are more manual configuration steps.

Select PowerPivot instance with new or existing farm 

Click next and on the next screen, feature selection accept the defaults.

Keep clicking through the wizard accepting defaults until you get to the instance configuration screen. This page I accepted defaults as well but its good to point out that you can change the Instance ID and root directory. I like to keep these things in the default locations and just change the data directories which we’ll do in a few.

Set PowerPivot Instance ID and root directory

Next we set the service account that this instance will run as. This should be a domain account and only be used for running this instance.

Set Analysis Services Service Account and Password

Click next and we are brought to the screen that we grant user accounts (or groups) admin rights to this instance. So add whoever should get admin rights to this analysis services instance. Then click the tab for Data Directories. This is where we can change the path of all the data files. The screenshot shows the defaults but I will change those to another drive and path.

Set Data Directories for PowerPivot Analysis Services

Click through the rest of the wizard and wait for the install to finish. That’s all there is to it. Now we are done with the SQL portion of the install. We can remove the account from the local admin group as well. Next we move on to the SharePoint portion of this process.

SharePoint Configuration Steps

First we need to deploy the PowerPivot solution package to the web applications that we would like to use PowerPivot on. You can deploy this package to just 1 web application or to all its up to you. To do so open up Central Administration, in system settings click on Manage Farm Solutions then click on powerpivotwebapp.wsp and then Deploy Solution. In the Deploy To field you can select where to deploy to. You need to deploy to wherever you want PowerPivot capabilities. If you want to allow the use of PowerPivot everywhere then you will deploy to each web app.

deploy powerpivotwebapp wsp

You should also take note that there should be the powerpivotfarm.wsp file and that should already be deployed globally. After you deploy repeat for all web apps that you want PowerPivot on and then start the services. To start the services go to System Settings –> Manage services on server. PowerPivot requires the Claims to Windows Token Service, the Excel Calculation Services, and the Secure Store Service to be running. The Claims to Windows Token Service must be running on every server that runs Excel Services or PowerPivot. So go ahead and start these services if they aren’t already. The screenshot below does show the Secure Store Service as stopped but that is only because it is running on another service in the farm.

Services needed to run powerpivot

Also just confirm that the SQL Server Analysis Services and SQL Server PowerPivot System Service started successfully as well.

Now we need to create the PowerPivot Service Application

Switch over to Application Management and click on Manage Service Applications. Then in the ribbon select New and SQL Server PowerPivot Service Application

New PowerPivot Service Application

Set the Name for the service application and create a new application pool. Add a new managed account to run the pool or use an existing one. Remember what account you used as you will need this information later.

Set the Database Server, Name, and authentication method. If you want this service application to be associated by default with all new web applications then leave the Add application proxy to default group checked, otherwise uncheck it.

PowerPivot Service Application Settings

OK we now have a PowerPivot service application. Let’s change a few settings to make it work.

Excel Services Service Application Settings

First go into the Excel Services Service Application settings and in the workbook properties area set the Maximum Workbook Size to something bigger like 50. This is because PowerPivot workbooks tend to have large amounts of data and are naturally bigger in size. We will also need to change this setting in another area that we will go over in a bit. Also in the Excel Services Service Application confirm that you have Trusted File Locations set to where you will be putting your PowerPivot Workbooks. Also make sure that Allow External Data to Trusted data connection libraries and embedded is set.

Secure Store Settings

Back in Manage Service Applications screen select the secure store service and click manage in the ribbon. If you haven’t done so already go ahead and generate a new key by clicking the button in the ribbon. After that is done or if you have already done it for another application then lets configure the unattended PowerPivot data refresh account. To do this we first need to create a target application so click on new in the ribbon. For Target Application ID you can call it anything you like I called it PowerPivotDataRefresh. Then for display name I used the same name but with spaces to make it nicer to read. Target Application Type should be Individual. You don’t need to specify the target application page URL as PowerPivot doesn’t use one. For the credentials page accept the defaults and for the Target Application Administrators enter the account that you used for the application pool earlier.

Click ok and when complete you should now see it in the list.

Pull the drop down and select Set Credentials. For Credential Owner enter an account of who should be allowed to change the credentials (I put myself) that get specified below. Then you specify the account that will be used for PowerPivot data refresh account.

PowerPivot Service Application Additional Settings

Now that we have our data refresh account in the secure store we need to configure the PowerPivot Service application to use it. So go back into manage service applications and then click on the PowerPivot service application name which will take you to the dashboard. From here in the top right you should see a configure service application settings link click it. In the Data Refresh section put the name of the Target Application ID that you created in the Secure Store into the PowerPivot Unattended Data Refresh Account field (Mine was PowerPivotDataRefresh) and click OK.

This account will need contribute permissions to any PowerPivot Workbook. Security can be done on a workbook by workbook, site by site, or collection by collection basis. For simplicity I granted this account contribute permission to the entire web application but using a user policy in central admin. So however you need to grant contribute permission to this account to your PowerPivot workbook.

The data refresh account will also need read access to any external data sources that the PowerPivot workbook uses. This completes the setup for the data refresh account. You should now be able to select this option in the data refresh section of each PowerPivot workbook.

Maximum Upload Size

Earlier we increased the Maximum Workbook size to 50 in the Excel Services Service Application settings. In order for this to actually work we need to set the web application to allow uploads of the same size. So in central admin click on manage web applications, choose the web app that will house your PowerPivot data and click on general settings in the ribbon. In the Maximum Upload Size section increase to whatever size you specified in the Excel Services Settings.

Web Application Maximum Upload Size Settings

Next you may want to enable Usage Data Collection if you want to have SharePoint gather its usage data and display the content in the PowerPivot dashboard in central administration. We’ll go over this in detail in another post.

The last thing left to do would be to Activate the PowerPivot feature for site collections You do this like you would any other site collection feature. Site Actions –> Site Settings –> Site Collection Features –> Activate the PowerPivot Integration Site Collection Feature.

You will need to do the above step for each site collection that you want to use PowerPivot on. In another post I’ll detail out a script to do this as well as a script to configure the service application. Once this is done you can go ahead and create a PowerPivot Gallery and start enjoying all of the fun and value that PowerPivot provides.


If I made any mistakes, or was unclear on anything, please feel free to leave a comment to correct me or ask the question. I try and respond quickly which is usually within a day or so.

1 Comment

Configure Custom Search Scope in SharePoint 2010 to Rollup Tasks, Documents, or Sites From Anywhere Part 3


Last post we covered how to add a core search results web part to a SharePoint page and configure the Web Part to show the results from our custom search scope which we created in part 1. If you didn’t read these posts, they can be found here:

Part 1: Creating Custom Search Scope to only find tasks from any SharePoint Site or Farm.

Part 2: Configuring the Search Web Part to use the custom search scope and display the results and details that we want

Today we will cover Part 3 and finally wrap up this exercise. First we use SharePoint Designer to change the XSL styling to get rid of the ugly search result look and give us a more traditional list look and feel. Then we go through exporting the Web Part. Finally we dive into visual studio to do some custom coding and make it so that the only results displayed by this Web Part are tasks assigned to the current user.

So lets get started. The first step here is optional, you only have to do this if you want some real data to work with in the data view. I highly recommend it since it allows you to see your work and results in real-time rather then in your head but hey its up to you. Open up the properties of the search core results web part that we have been working with and in the XSL editor add this code. What it will do is return all of our search results in XML format, which we can save to a file and use as a data source in our next step.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xmp><xsl:copy-of select="*"/></xmp>

Apply the changes and now in our search results web part we get our search results as XML. The content of your core search results web part should look something like this:

Search Results as XML

Copy it all and paste it into a file and save as results.xml. Now open up SharePoint Designer 2010 and go to the site that has the web part we have been working with. Click on Data sources on the left hand side. Then we are going to create a new data source from XML file. So Click on XML File Connection button in the ribbon.

 SharePoint Designer

When prompted navigate to and select the results.xml file we saved earlier. Add the file to the site and click ok. You now have a new data source to work with. Open up the page that has the search web part on it in edit mode. Select an area that you can insert a web part in and then click Insert –> Data View –> Results.xml

SharePoint Designer Data View

This is the quick way to get results showing. I find it a little easier to actually insert an Empty Data View and then link the data source and pick which fields you want to display in which order. Either way is fine. Both ways require that you know go and choose what fields you want to display from the right hand side. I selected Title first, then description, then task status, and finally assignedTo (although they should all be assigned to me, this will prove if its working or not). I insert as a multiple item view and here we go. Now that you have all the fields you want you can move items around in the design window to get it showing the way you want. After you have everything set, we want to go into the web part properties and then the XSL editor and copy all of the code, then go into the properties of the search web part and the xsl editor and replace everything in there with the code from the data view. Yes I know surprisingly this just works!

Save, stop editing and view it in a browser if it is working and looking the way you want (except showing results for all users) that’s great keep moving on. If not go back and fix it because you won’t do it later.

Now lets export this web part so that we can reuse the work that we have already done to build our reusable solution for all users. Go to the page that we have our core search results web part on that we have already configured to use our custom search scope, display some additional fields, and have just changed the styling. You click on the drop down arrow in the top right corner of your web part and then select export. Save this web part to somewhere you’ll remember.

Now open up visual studio and create a new SharePoint Empty Project. For this example we will work in C#. Then add a new item to the project and choose Web Part. Right click on your new item and click add and then existing item and select the web part that we exported earlier. Go ahead and delete the other .webpart file that was created by default or you can just replace the contents. Ensure that the name of the .cs file matches and that all references in the .cs and .xml file are updated accordingly. At this point your project should look something like this:

Visual Studio SharePoint WebPart

Open up the .webpart file as we need to make one change in it. We need to change metadata type element to load the MyTasksWebPart code (which we create in a minute) rather than the CoreResultsWebPart code.

We started with this:

Visual Studio webpart metadata element

And changed to this:

visual studio custom sharepoint webpart

Now we open up the .cs file and make the necessary changes to show only tasks assigned to the current user. So double click on the MyTasksWebPart.cs

If you have used all of the same names then you can just replace the contents of that file with the below code.

using System;

using System.ComponentModel;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using Microsoft.SharePoint;

using Microsoft.SharePoint.WebControls;

using Microsoft.Office.Server.Search;

using Microsoft.Office.Server.Search.Query;

using Microsoft.Office.Server.Search.WebControls;

namespace MyTasksRollup.MyTasksWebPart



    public class MyTasksWebPart : Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart


        QueryManager _queryManager;

          protected override void OnInit(EventArgs e)



            _queryManager = SharedQueryManager.GetInstance(this.Page).QueryManager;


        protected override System.Xml.XPath.XPathNavigator GetXPathNavigator(string viewPath)


            SPUser user = SPContext.Current.Web.CurrentUser;

            _queryManager.UserQuery = string.Format("scope:"Tasks" AssignedTo:"{0}"", user.Name);

            return base.GetXPathNavigator(viewPath);


        protected override void CreateChildControls()



            //debug info

            //Controls.Add(new Label { Text = string.Format("FixedQuery: {0}<br/>AppendedQuery: {1}<br/>UserQuery: {2}", FixedQuery, AppendedQuery, _queryManager.UserQuery) });




If you have been using different names, or want to understand what we did, here is the explanation:

First our code looked like this:

namespace MyTasksRollup.MyTasksWebPart



    public class MyTasksWebPart : WebPart


        protected override void CreateChildControls()





The first thing we do is make the new Web Part class inherit from CoreSearchResultsWebPart which is in the Microsoft.Office.Server.Search assembly. To do this we changed this line

public class MyTasksWebPart : WebPart

To this:

public class MyTasksWebPart : Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart

Then we override a few methods so that we can add the filtering that we need through the SharedQueryManager for the page. This is done with each line that you see “protected override” on. The real magic in this code is the code in the GetXPathNavigator. This is where we actually filter for the current user in the AssignedTo field

protected override System.Xml.XPath.XPathNavigator GetXPathNavigator(string viewPath)


            SPUser user = SPContext.Current.Web.CurrentUser;

            _queryManager.UserQuery = string.Format("scope:"Tasks" AssignedTo:"{0}"", user.Name);

            return base.GetXPathNavigator(viewPath);


Now save it all, build and deploy. You will now have this as a web part option to add to your page. It will be grouped under custom unless you put it under a different group. Add it to the page and enjoy.

Hope you find it useful, Hope it saved you some time and headaches and as always I look forward to hearing your feedback, comments, and suggestions.


Here’s what mine look like:

SharePoint content rollup from anywhere


Configure Custom Search Scope in SharePoint 2010 to Rollup Tasks, Documents, or Sites From Anywhere Part 2


Last time we covered how to create a custom search scope to find and index only the things that we want to display regardless of where they are. If you didn’t read it, you can find it here: Create a Custom My Tasks Web Part to Roll Up Tasks from everywhere Part 1

This time we will cover how to add and configure the search core results Web Part so that it displays the results we want from the custom search scope.

So to get started, go to the page that you would like to have the Web Part located on. Edit the page and add the Search Core Results Web Part. This is a default out of the box Web Part. If you don’t see it make sure that you have the search features enabled for that site collection.

Click on edit the web part and in the settings change the name to something better like “My Tasks” and then set the Cross-Web Part query ID to “User query” also add a value in the Fixed Keyword Query box to point to our new custom search scope. In this case I enter scope:”Tasks” which is what we called it in the last part.

Results Query Options

The next setting we may want to look at is the Append Text To Query field. Here we can put in values that will be used as the default query. Leaving it blank will return all results that meet the criteria of our custom search scope. We don’t want our users to have to look through everything so we set this to display what we want them see by default. For this example I added the following to this field all in one line.

TaskStatus:"In Progress" TaskStatus:"Not Started" TaskStatus:"Deferred" TaskStatus:"Waiting On Someone Else"

This will filter out the tasks that have been marked as completed. Only showing ones that have a TaskStatus of In Progress, Not Started, Deffered, or Waiting On Someone Else.

A section above in the web part properties you will see a fetched properties field. In here we can set what properties we would like to be able to show in the results. For this example we want to be able to show the assigned to and the current task status in our results. So we add <Column Name="AssignedTo"/>                                      <Column Name="TaskStatus"/>   at the end of the line but inside of the </Columns> tag.

Fetched Properties for My Task Rollup WebPart

After adding these to the fetched properties we need to change the XSL to display them. To do this click the XSL editor button in the display properties section of the web part properties and add the fields to the match=”Result” xsl:template.

If you are going through the entire example this will change later anyway. We will replace all of this XSL with the XSL we generate from the data view in the next post.

After this is in place you can apply and complete editing when you refresh your page you should see a list of tasks that are randomly scattered throughout your SharePoint farm. You will only see tasks that you have access to.

In the next post we will go through how to change the look and feel of the results to look more like a task list. We will also go through how to only display results that are assigned to the current user. This will make it look neater and cleaner and also make it much more valuable to your user as you only show them tasks that are theirs.

I know it took a long time to get this post up, I apologize I have been busy. I promise that Part 3 of this series which wraps everything up will be posted sometime this week.

No Comments

Uploading User Profile Pictures Programmatically


One of my favorite features of SharePoint 2010 is the User Profile. I think it is one of the most under utilized yet great value enhancement since the last version. Many companies struggle with Identity Management and a single directory for accurate information lookup. With the User Profile we can solve this problem. Although the User Profile Service Synchronization may be a little bit of a pain to initially get setup and configured as documented in this previous post:

Once running it is a very valuable asset and tool for a company, especially large global organizations. With the ability to sync from multiple sources it provides the ever so desired ability of a single source for all user information. Then add in user sub-types and organization profiles and sub-types and we have a very nice robust platform to find users, use as a global phone directory and more.

One thing that I see fairly regularly is that the profile pictures are not there for the organizations that are using the user profile. This is a shame especially in large organizations. I know the picture isn’t needed but it is nice to have a face to the person that you deal with all of the time yet never get to see. Most companies have the pictures for each user already as they assign a badge with photo on it. So why don’t we use that? Well mainly its one of two things, we don’t think about it or we don’t know how to pull the pictures out of the badge system and put them into SharePoint. Today I will go through how to programmatically upload and display pictures for each user. We will use a csv file that has some fields on it and it will upload, assign, and convert the picture for a number of users. We won’t discuss the badge system piece as that could be different for everybody. For my system there was a database of users and information along with photo number. The photos were stored in a file share.

To accomplish this task I did use the SPUtils.ps1 functions which can be found here. Thanks to Chris Johnson for his work on this. Today we will cover some of the same stuff found in his post, but add on to allow you to do multiple users at the same time. Chris covers it on an individual basis.

I also used the Quest Active Directory Commandlets found here

You will want to load the Quest Active Roles snappin and the functions in SPUtils.ps1 before trying to run anything else below.

So to get started I took all of the photos from the file share and uploaded them to a SharePoint picture library. You can do this a number of different ways, use explorer view and copy and paste, or use the UploadSPFile PowerShell commandlet.

So now we have a library full of user pictures. We take a csv file that has whatever fields you want really but at least the picture and loginName columns.

So now for the real work. We now use PowerShell to import this csv file and go through and set the profile property for each user. Here is the script, items that must be changed are highlighted in green. This script also assumes that the column headings in your csv file are “LoginName” and “Picture”

function Set-UserPictures([string] $UserFile)
    $siteUrl = http://<mysitehosturl>
    $upm = GetProfileManager -url $siteUrl
    $picturePropertyName = GetProfilePropertyName -UserProfileManager $upm -PropertyName "PictureUrl";
    Import-Csv $UserFile | foreach-object {
                $User = Get-QADUser $_.LoginName
                    $name = "DOMAIN" + $_.LoginName;
                    $up = $upm.GetUserProfile($name);
                    $fullURL = http://<url to where you uploaded the pictures in previous step>/ + $_.Picture;
                    $up.get_Item($picturePropertyName).Value = $fullURL
                    Write-Host "Updated Picture for $name" -ForegroundColor Blue
                    Write-Host $_.LoginName "Not Found" -ForegroundColor Green

The PS1 file itself can be downloaded here.

After you have loaded the function you can run it by typing:

Set-UserPictures c:<path to csv file>

This sets the Profile Picture however if you look at your profile page now you see there is a broken image. This is expected. If you don’t have a broken image something went wrong.

After the script completes you should then run

Update-SPProfilePhotoStore –MySiteHostLocation “http://<my site host url>/”

This command is great. What it does is it takes a look at every profile picture and resizes it into 3 different sizes. The three different sizes that SharePoint natively uses for these pictures, such as thumbnail and it saves it in SharePoint. Then it goes and resets the profile picture to the appropriately sized one. After this completes, you should see your photos displaying nicely.


Find What Lists or Sites Are Using a Particular Site Column


I have come across this problem a few times now. You want to delete the site column and get an error like… You can’t delete this column because it is still in use. Or Fields associated to content types cannot be deleted. The main problem is that how do I know what site or list is using the column? Searching around the web I found a few suggestions however only one had a suggestion other than delete everything and start over or create everything new and leave the old as it is. However that one was using SQL queries directly against the SharePoint DBs and although it was only reads which is better then making writes directly it is still against Microsoft Support rules so I had to find another way.

PowerShell to the rescue! After doing a little digging it became apparently clear that it is actually very easy to find all instances of a site column within a site collection. The short little script that I will share today will look at every site and every list within a site collection and return the GUID for the site and list that it finds that column. This is great because now you can easily identify where the column is and go to those lists and remove it so that you can safely delete the site column. Better yet, we can pipe the results to a PowerShell cmdlet to remove the column all at once!

So here is what I used

First we get the site collection that contains the site column

$web = Get-SPWeb http://”sitecollectionurl

then we get the column that we are looking for

$column = $web.Fields[“Column Display Name”]

Then we find where it is used


This returns a list of WebID and ListID

its both GUIDs which kind of stinks since we don’t memorize those. So next what you can do to get the URL is put in Get-SPSite http://sitecollectionurl  | Get-SPWeb | select URL, id


How to Remove the What’s Happening Status Message from the User Profile Page in SharePoint 2010



SharePoint 2010 offers a lot as far as social networking aspects go. While many of us love these features and use them everyday in personal and professional online worlds such as Facebook, MySpace, Twitter, LinkedIn. The corporate world still seems a little tentative in supporting them. While I’m a huge supporter of the My Site and User Profiles in SharePoint 2010 and I try to implement as many of those features as I can with every deployment. Some organizations want no part. I have seen a growing theme amongst some customers and that is they feel (what they think is) the My Site is too “social”. What I have noticed is taking away a few of the features and then they like it and see value and agree that it should be deployed. Almost every time the first feature that CEO’s, CIO’s, and CTO’s turn their head at and decide they don’t like “My Sites” for is the Status Message (or better known as the What’s Happening) bubble above the user picture.

Whats happening Bubble

This feature in combination with the newsfeed seem to make corporate executives think its “Too Social” I’ve found removing this control and disabling it from showing up in the newsfeed, in combination of changing the default page for the User Profile from the Newsfeed page to the User Profile page seems to be a good compromise where execs don’t get turned off, see some value and agree to deploy and use it. This is a great start as far as I’m concerned, we can get them to enable those features after we get them using everything else.

So lets jump into the technical side of today’s post. How do we go about changing the default home page of the My Site Host? Then disable and remove the What’s Happening Status Message. Pretty simple believe it or not. To change the default home page open the site collection in SharePoint Designer (you need to be a site collection owner of the my site host). After its open click on all files on the left hand side. In the right main area you should now see a bunch of items one being default.aspx which is the current default page. The other being person.aspx which is our desired default page. So go ahead and select person.aspx and then in the ribbon click set as home page.

SharePoint Designer 2010 edit page

Now we have changed the default page from the newsfeed page to the user profile page. Next we will disable and remove the Status Message.

First we want to go into Central Administration –> Application Management –> Manage Service Applications –> Select your User Profile Service Application and then click manage in the ribbon. Under People select manage user properties. Then scroll down and find the Status Message property, pull the drop down and select edit. In the edit property screen this is where we will change the settings to not show or allow editing as seen in the screenshot below.

User Profile Service Application Settings

Now you might think they are are done based on reading the options. It would seem it can’t be edited and it isn’t being shown anymore but that isn’t entirely true. You will still see it if you go to your profile page right now. So the last thing we need to do is go back to SharePoint Designer and edit the person.aspx page that we set as the default page earlier.

To do this go back to SharePoint Designer and click the hyperlink for person.aspx this time and it will open in edit mode. Since we want to change settings set in the site definition we need to edit in Advanced Mode. To do this select it from the ribbon.

SharePoint Designer 2010 Advanced Mode

Once that is done the page will refresh and all of the code is now editable. Find the following div tag and remove it (or comment out)

Comment Out Status Message Code

Save your changes. Close SharePoint Designer and go to your user profile. You will see that you default to your own personal profile page and the Status Message control is not displayed. Now go on and get deploying those profiles and my sites to the rest of the company!


Configure Custom Search Scope in SharePoint 2010 to Rollup Tasks, Documents, or Sites From Anywhere Part 1

Today’s post will be the start of a series of posts that will show how to leverage the power of SharePoint 2010’s search to address limitation of cross site collection content rollup. Many times I get requests to roll up all tasks in SharePoint assigned to a particular user. This is fine if all of those tasks are assigned within the same site collection. When it is all the same site collection meaning we are only looking to roll up content from sub sites then the Content Query WebPart (CQWP) is a great option and probably my favorite WebPart that SharePoint offers. However this becomes a problem when we assign tasks in multiple site collections. The data view webpart or XSLT webparts can connect to these other locations and roll up the content nicely but you will need to know the locations that the tasks are in and you will have to update these list views whenever a new task list, or document library (whatever content you are looking for) is created. Being that the SharePoint 2010 My Site defaults to being a separate site collection I see more times than not content is in various different site collections and the need comes up every so often to show this disjointed content in one location.

Through this series I will go over how to roll up all tasks assigned to a particular user regardless of where the task resides. Leveraging the power of the search engine allows us to ignore the typical boundaries of the site collection for content roll up and in fact it will even eliminate the boundary of the SharePoint farm. I will walk through how to create the custom search scope, how to configure the search core results WebPart, and the custom code and XSLT changes to make it user specific and a custom look and feel so it doesn’t look like search results. So without any more boring intro and setup lets get started.

The first thing we need to do is configure the custom search scope. You may have done this for a number of different things already, for those that haven’t here are the steps.

Open up Central Administration, go to Manage Service Applications, click on your Search Service Application and then click on manage on the ribbon. This takes you to the search administration page.

On the left hand side under Queries and Results click on scopes

SharePoint 2010 Central Administration

Then click on New Scope, create a title (I called mine My Tasks), fill in the description and then you can use the default search results page for now.

How to Create New Search Scope SharePoint

You are taken back to the scopes page and you can see the new custom scope that we just created. Now we need to add the rules that make the scope work, so click on add rules.

Custom Search Scope SharePoint

First we want to add all of the content sources that you would like to find tasks on. This allows you to not include tasks on a certain site if you would like, it also it want allows you to get tasks from another farm. You will only be able to configure this for sources that you have indexing configured. So if you are looking to find tasks on another farm you have to setup that connection to have it indexed first. We won’t go through that right now. For this example we will just use all local SharePoint sites. So select the content sources radial button, in content source field select local SharePoint sites, make sure that the Include option is selected and click OK.

SharePoint 2010 Task Rollup

Now Hover over the new custom search scope and click “edit properties and rules” so that we can add an additional rule.

Click on New Rule

Search Scope Rule Configuration

Then select property query, in the property restrictions field select content type and the = field type in “task” without the quotes, make sure Include is selected and click OK.

Advanced Search scope rule settings

If you don’t see ContentType as an option when creating this rule, go to Search Service Application –> Metadata Properties and then edit the managed property and set All this property to be used in scopes. Then repeat the steps above.

After changing crawled or managed properties a full crawl of the content source is required for those changes to take effect. So whatever content sources you added, make sure to kick off a full crawl of those sources.

That takes care of creating the custom search scope. Next time we will go over adding the search core results WebPart and configuring that to use the new custom search scope. Then we will finish the series up with some XSLT styling to make it look more list like than search result. I hope this helps you out and gets you started and as always I look forward to hearing your comments.


Customizing Fab 40 Template in SharePoint 2010


Last time I went through how to create a document library, create a custom column, customize the project list display item form to include a related documents section on the Budgeting and Tracking Multiple Projects fabulous 40 template using SharePoint designer 2010. We used a connected webpart to filter for only the documents we wanted based on the item that we were looking at making it nice and clean for the user. Read about it here

Today, I would like to make another customization to this same application template. This time we will work with the project tasks list. The way the project task list is by default there is a description box but there is no place to go and post updates to the task. You can change the status and update the percent complete but we want an area to post comments or notes. A simple thing to do would be to add an existing site column (comments) to the project tasks content type and call it a day. The drawback with this is then you either overwrite and lose the comments from the time before or you need to draw a line and manually type a date time stamp and its just not so nice. The way around this is to enable versioning on the list, then add a new comments column to the project tasks content type. The column that we create will append changes and combined with versioning will provide a nice single view with system date/time and user stamp.

So let’s get started…

First thing we do is create a new site column. Go to your root site collection site actions –> site settings –> Galleries. Under Galleries you should see a site columns link, click it

SharePoint 2010 Site Settings

Once there click on Create and then choose a multiple lines of text column, call it whatever you want (can’t use comments because there is already a column by that name) I chose Comment. Add it to a column group, I have created my own group, look over the rest of the settings and set as you choose, I chose defaults until the Append Changes to Existing Text which I selected YES for.

Create Custom Column in SharePoint List

Click OK and we now have a site column. You will notice that you can go and add this column to the project tasks list now like you would any other column but when you click on new item you notice that you don’t see Comment. That is because the list is set to use a content type, we have to go and add the column to the content type columns to get what we want. So open SharePoint Designer 2010 and open your site up select Lists and Libraries from the left Navigation then select Project Tasks. At the bottom of the left hand column there should be a Content Types section click on the Project Task content type.

SharePoint 2010

Then click on Edit Content Type Columns as show below

Edit Content Type SharePoint Designer 2010

Click on Add Existing Site Column on the ribbon and then in the box that opens find your column and select it

SharePoint Designer 2010 Adding Site Column

Now save your changes and your column should now be on the new item menu.

So go back to the SharePoint site click on the project tasks list and then click new item and make sure that you now see a comments box. If not something is wrong, go back and fix it.

Before we finish though we want to enable versioning so that we can nicely track the changes that are made on each item. This can be done from within the project task list. Go to List Settings and then under Versioning Settings turn it on.

After Versioning is enabled go and add a new task. Then edit it add some more comments, and then view again

Project Task Content Type Comments Column


Making Changes to Fab 40 Template in SharePoint 2010


I recently was working on creating a site that would do some light project management tracking. The Budgeting and Tracking Multiple Projects template from MOSS 2007 seemed to almost fit the bill. Microsoft has stated that they aren’t providing a new release of the fab 40 templates in 2010 format which is kind of a bummer. However some of these templates are upgradeable to SharePoint 2010. Mostly the .wsp templates but there are a few issues depending on the template you are upgrading. In another post I’ll discuss those. For today I wanted to go through how to go about making changes and modifying items particularly the content types that are included in the budgeting and tracking multiple projects template. So for the time being I’m going to assume that you have this template installed in working fashion on a SharePoint 2010 farm.


To get started we need to create a new site from this template. You would do this like you would any normal site.

Site Actions –> New Site –> Pick the template –> Name it and select your permission and navigation settings.

Once we have a site we have a good starting point. The one thing that was missing that we noticed right away was the fact that after inputting a project into project list, you have related tasks, issues, and milestones but there was no project documents. We planned on posting documents related to the multiple projects such as contracts, meeting minutes, diagrams etc.

The template offers a document library, and you can certainly create additional ones but the requirement was to have it tied to a project and have the view that the content type offers of “Related Documents” when clicking on any particular project title.

Project List Customized Content Type

As you see the highlighted section in the project display form has related documents….you don’t have that yet.

To add this we need to do a few things. First we need to create the document library. Then go into our document library and add a lookup column for the project list. This is how we will “relate” the documents to a specific project. After that is done we need to open SharePoint Designer to edit the Project content type.

So first go to Site Actions, More Options and select document library, I called mine Project Documents to go along with the naming of all the other lists in this template. After we have the Project Document Library created go to library settings

SharePoint 2010 Ribbon

Go to the columns section and create a new column. I called it Project, select lookup Column. You want to lookup information from another list on the site and that list is the Project List and we want to get information from the Project Name column. Add it to the default view and if you want (its probably a good idea) change the required field from no to yes

Create Custom Column SharePoint 2010

Ok so now we have the library set and we have a column for the project it is related to so now we need to get it onto the project display form like the other lists. To do this you open SharePoint Designer 2010 and open up your Project Management Site.

On the main page select lists and libraries and then select Project List.

From here on the right hand side you should see a Forms section and you will want to click on DisplayForm.aspx

Edit DisplayForm.aspx with SharePoint Designer 2010

This will open up the form that you see when you click on the project title within the SharePoint site. You can put the Related Documents Library anywhere you want I chose to put it under Related Milestones. Put the cursor in the next <td> tag and then select insert from the ribbon, then display item form and then select the Project Documents Library.

You document library is now added to the form but that is just going to show all documents. We only want to see documents related to whatever project we select so click on the webpart so it is highlighted then go to the ribbon select web part and then Add connection.

Creating Web Part Connection

Once you do that a box pops up and you want to select get filter values from

Web Part Connection Settings 

then connect to a webpart on this page

Web Part Filter Values From

Then select Projects List as the Target Web Part and Provide Row to in the Target Action

Web Part Connection Provide Row To

Then map the fields from project list (Project Name) to Project Documents (Project)

Web Part Connection Field Mapping

Then click finish. Double click on the Project Documents web part again to open web part properties and change the name from Project Documents to Related Documents, then save all your changes. Go back to the SharePoint site, click on a project in project list and you should now see the related documents area that will only show documents tagged for that project.


Next post I will go over another customization to this same template that allows you to add notes or comments to task list items. Makes it much nicer than using description and drawing lines. It comes out time and user stamped and looks like this:

SharePoint 2010 Content Type Customized Comments