Category: Development

SharePoint or Application Development related posts

Event – Dev Intro to SharePoint Search

I will be presenting my session A Developers Introduction to SharePoint Search for the Triangle SharePoint Users Group on Tuesday October 5th.  The session will cover Search from a Developer’s perspective including Query Structure, how to configure the standard search web parts, how to format the results display along with how to extend search and integrate it into your customizations using the API for rich user experiences.

As always, the group meets at 6pm at the TekSystems Raleigh

Disabling the “What’s Happening?” Display on the User Profiles

One of the SharePoint 2010 features I really like is the user status information that is integrated into the updated User Profiles.  Unfortunately some organizations are not quite comfortable or ready to support the feature.
Here is what it looks like with the user status set:
User Profile with Status

Disabling the Status Message field

With normal User Profile property management you can disable the Status Message field (known internally as SPS-StatusNotes).  You want to not only change the Edit Settings to not allow users to edit the value, but you want to also ensure that the property is not displayed on any of the profile pages.
Here is a screenshot of the Edit User Profile Property screen:
Edit User Profile Property screen

Removing the Control

While the property is now disabled and we have configured it to not show on the regular profile forms, the Status Message control still shows on the Person.aspx page and gives the users the impression that they can continue to use it.
Here is a screenshot from after the property was disabled:
Edit User Profile without Status
The status essentially stays unset, and anything that the user might type in cannot be saved. There is no way for them to know that the status can no longer be set and no error is displayed so it is confusing.
The control cannot be removed through configuration unfortunately.  To remove the control you will need to edit the Person.aspx page in the MySite Host site collection.  It is important to note that the Person.aspx page is shared among all user profiles in the User Profile Service Application so any changes to the page impact all uses.
To edit the page you will need to be a site collection administrator for the site collection.  Open the site collection in SharePoint Designer and then open the Person.aspx page.  You will need to go into Advanced Mode, which is selectable in the SharePoint Designer ribbon on the right hand side.
Once the page is editable, find and remove the following code:

[sourcecode type=”plain”]
<SPSWC:StatusNotesControl runat="server"/>

Once the page is saved, the control will be removed and you will no longer see the pop-up bubble.
Here is what it looks like with the control removed:
Edit User Profile without Status Control

Re-Enabling the Control In The Future

If you need to re-enable the control in the future, you can simply reset it to the original Site Definition in SharePoint Designer.  This will restore the control and the page back to normal.

SharePoint Designer 2010 Available Workflow Actions

A colleague of mine was asking for a comprehensive list of available workflow actions in SharePoint Designer 2010.  I did some searches and couldn’t find the details so I thought I would provide them here.

Core Actions
  • Add a Comment 
  • Add Time to Date 
  • Do Calculation 
  • Log to History List 
  • Pause for Duration 
  • Pause until Date 
  • Send an Email 
  • Set Time Portion of Date/Time Field
  • Set Workflow Status 
  • Set Workflow Variable 
  • Stop Workflow
Document Set Actions
  • Capture a version of the Document Set 
  • Send Document Set to Repository 
  • Set Content Approval Status for the Document Set 
  • Start Document Set Approval Process
List Actions
  • Check In Item 
  • Check Out Item 
  • Copy List Item 
  • Create List Item 
  • Declare Record 
  • Delete Item 
  • Discard Check Out Item 
  • Set Content Approval Status
  • Set Field in Current Item 
  • Undeclare Record 
  • Update List Item 
  • Wait for Field Change in Current Item
Relational Actions
  • Lookup Manager of a User
Task Actions
  • Assign a Form to a Group 
  • Assign a To-do Item 
  • Collect Data from a User 
  • Start Approval Process 
  • Start Custom Task Process 
  • Start Feedback Process
Utility Actions
  • Extract Substring from End of String 
  • Extract Substring from Index of String 
  • Extract Substring from Start of String 
  • Extract Substring of String from Index with Length 
  • Find Interval Between Dates

I was disappointed to report that there is still no out of the box action for calling a Web Service or action to bring back other attributes of the User’s Profile.  Custom or Third-Party actions will still have to be used to support this.

Event – SharePoint Saturday Tampa Wrap-up

Another SharePoint Saturday is in the books.  As always it is great to see the interest and how people can come together to share their experiences.

A big thank you to everyone that attended my session, to the event sponsors and of course to all of the event coordinators and volunteers that made it happen.

Despite the technical issues with my VM, hopefully there was some good content shared during the demo.  For anyone interested, here is my slide deck:  SharePoint 2010 Personalization Overview

User Profiles – Driving Business Process

The workflow features first introduced in WSS 3.0/MOSS in 2007 and enhanced in the 2010 offerings present an opportunity for organizations with SharePoint to start to automate the coordination of their business processes.  While many have been working with it, one of the limitations I have seen is that everything is localized to a particular site or process.  In many cases there are configuration or user attributes managed in a local list that can be used as a data source. 

Manage the Data Centrally

One technique that is not widely used, but could greatly enhance the capabilities and manageability of the workflows as a whole would be to utilize the User Profiles more to house and maintain information relating to the users.  By managing it centrally it can be used by all processes throughout the organization.  For user maintained properties, it provides a central and secure mechanism for them to maintain it.  For system maintained properties, synchronized from an external system through AD or the BCS (HRIS, CRM, etc) there are already mechanisms in place to manage this.

In SharePoint Designer 2010 there is a new action that supports a lookup for a user’s manager.  This would be a critical component to support approval workflows obviously, but for most business processes there are other attributes that are also needed.  Some could be based on default user profile fields like Location or Hire Date, but others are likely to be custom to the organization.  Custom properties could include employee IDs, department charge codes, division identification, etc.  [Note: See User Profiles – Creating Custom Properties for a walk through] 

How to Access the Data

Typically the information is accessed via the API with UserProfileManager or the UserProfileService web service (/_vti_bin/userprofileservice.asmx).

InfoPath – From InfoPath you can identify a DataSource through a Web Service call pointing to the UserProfileService.  [Note: See Itay Shakury’s blog for full walk through]

Visual Studio Workflows – In visual studio with the full ASP.NET capabilities it is easiest and most effective to use the UserProfileManager to access the profile and all properties.

SharePoint Designer Workflows – With the exception of the manager lookup action that was added, SharePoint Designer workflows will need either a custom or third party action that can interact with the User Profiles. 

I am currently working on a simple action that I will blog about and post to CodePlex.

Other Uses – Delegation of Authority

This process could also be used to provide a mechanism for maintaining additional, more complex properties.  An example would be something like Delegation of Authority which allows a person of authority to be able to delegate (or pass) that responsibility to another person.  SharePoint does not handle this at all out of the box.  A series of fields could be defined to support this; Start Date, End Date, Delegate.  This information could be read into the discrete processes with management being centralized in the User Profiles.

The limitation with this model is that the User Profiles are not like a list and do not support advanced business rules.  If that is required a separate system would need to be build, but I would recommend you try and keep it centralized and not built into the specific process.


By leveraging the User Profiles as a central repository that can support your organization’s processes you will simplify the management of the information and make it much easier to reuse in a consistent manner across the many processes. 

Review – Pro SharePoint 2010 Development

I was given the chance to review the Pro SharePoint 2010 Development book recently and I jumped at the opportunity.  I thought that the book for 2007 was critical reading, and with the new changes that come to the 2010 platform it is even more true of the updated book.

It does an excellent job of giving an overview of what is new with SharePoint 2010, what the development tools are (including SharePoint Designer), and how to work with each of the feature areas (Workflow/ECM/WCM/Social/Search/PerformancePoint/etc). Some developers may be critical about the book because it is fairly light on code (there is additional code available on the Wrox website), and there is no comprehensive resource on the API (always up to date and available on MSDN).  With the size and scope of SharePoint at this point it is very difficult to provide deep content on each of the subject areas.  Each topic area can and should be its own book.

Who This Book is Perfect For

I would highly recommend it for Solution Architects and Developers responsible for delivering a number of different types of solutions.  I know many very good SharePoint developers that can code a web part with their eyes closed, but have little understanding on how to take advantage of many of the other areas of the platform (Social, Search APIs).  I think this can be a great ongoing reference when those projects present themselves.

I would also recommend it to ASP.NET developers making the transition to SharePoint.  In the past, the resistance I have seen from ASP.NET developers has primarily been based on their lack of understanding about the platform as a whole.  This book provides an excellent foundation for that understanding. 

I would also recommend this book for IT Decision makers trying to create standards and methodologies around the different types of customizations that will be supported in the organization.  There is good content relating to SharePoint Designer and how to manage its use in the environment.

Who This Book May Not Be For

I would like to think that this book is perfect for any SharePoint developer, but if you can only buy one book and only want to develop one thing then this may not be the right book. 

Content Aggregation in SharePoint 2010

One of the areas I continue to see companies struggle with is sharing and reusing content.  Many will cram everything into a single site collection, or worse yet a single web so that everything is in one spot and available.  A little over a year ago I wrote an article titled “The Importance of a Content Syndication and Aggregation Plan” where I covered a few of the method used in the 2007 version.  There were a lot of limitations with the out of the box toolset, many relating to the site topology boundaries.  The 2010 version brings a few important improvements that I think will benefit most companies.

Capabilities in SharePoint 2010

Things are vastly improved in 2010.  All of the features from 2007 are still available, and some of them have been improved.  They include:

  • Content Query Web Part (CQWP) – with SharePoint Server
  • DataView Web Part (DVWP)
  • RSS
  • Content Deployment – with SharePoint Server
  • Content Types (promote common definition and reuse)
  • Custom Web Parts

Some of the new features include:

Calendar Overlays – One of the most common requests I have received in the past is to aggregate multiple calendars.  Whether it is for doing a roll-up on the teams or groups in a department or for pulling together dates across multiple projects, people need to be able to merge calendars.  With 2010 you now have the ability to aggregate up to ten calendars in a single view.  These calendars can be in any site collection, and can even be from exchange.  This makes it super easy for example to pull together a main company calendar with the entries being managed by different departments like HR and Marketing or across divisions.

Check out Bjorn Furuknap’s blog for details.  He did a great walkthrough on how to View Multiple Calendars in SharePoint 2010 here.

Managed Metadata Service – As the name suggests, this is a centralized service that enables you to manage your terms and content types.  Previously Content Types were bound to a specific site collection and working with them in more than one site collection meant manually keeping them in sync.  Having content described consistently across an organization makes aggregating that content a whole lot easier.

Here is the documentation on TechNet for the Managed Metadata Service.

A Word of Caution

An important word of caution; just because a feature is supported does not mean it will meet your needs.  In previous versions some of the aggregation features that were available, like the ability to connect to another list in the site collection with a DVWP or CQWP, worked fine when working with a few data sources but did not scale well.  I have heard of cases where hundreds of data sources need to be aggregated into a central source.  Be sure to perform both functional and performance testing to ensure that it meets your needs and if not, look to a custom solution that fine tune the process and perhaps implement a special caching mechanism.

Think About Content During Topology Planning

As part of the site topology planning or review, it is important to think about the content that will be stored and where else it might need to be used.  Make sure that the team is familiar with the different aggregation or roll-up options and what the pros and cons are to each.   

Related Articles

%d bloggers like this: