Archive

Archive for the ‘SharePoint 2010’ Category

Building advanced Project Server workflows with Nintex Workflow for Project Server

March 10, 2012 Leave a comment

Last week I was lucky enough to be interviewed by Dux Raymond Sy about my upcoming session at the Microsoft Project Conference which I will be presenting with Mark McDermott of Nintex. Mark and I have been busy putting the final touches to the presentation and demonstrations and have a really great session planned.

Our session is on Thursday 22nd March at 10:30am in room North 222 C. If can’t make it, or even if you can, make sure you follow the twitter hash tags #pc332 and #mspc12 to keep up with the action.

Hiding & Disabling ribbon items in Project Server, Part II

December 13, 2011 2 comments

In the last post, we covered a few things you will need to know when hiding or disabling ribbon buttons in PWA. In this post we will look at how to actually hide the buttons.

Where to start?

Irrespective of whether you wish to hide or disable a button in the ribbon, you will need to follow the same basic process by building a solution in Visual Studio that will deploy your ribbon customisation.

To start, open up Visual Studio and choose to create an Empty SharePoint Project.

Create Empty SharePoint Project

Enter a name and then click on OK. You will then see the SharePoint Customisation Wizard, enter the local site you wish to use for debugging and choose to ‘Deploy as a sandboxed solution’.
SharePoint Customisation Wizard

On clicking finish, Visual Studio will create a solution ready to be customised.

To start with we need to create a feature,  this is a logical container for our customisation and allows the user to turn on and off the customisation by activating and deactivating the feature. To do so, right click on Features in the solution explorer and choose Add Feature.

Add Feature

A feature will be created and Visual Studio will show a page where you can enter information about the feature such as the name, description and the scope. In this case we are going to choose Web (for an individual site) as we want this change to deploy only to the /PWA site and not all the children sites.

Hidebutton Feature

Next we want to add an element to the solution, this is where the real work is done and contains the XML that will be used to configure our ribbon.

To add an element, right click on the project name, choose Add, New Item

Add New Item

In the dialog that is displayed, scroll down and select Empty Element and give it a name.

Add Element

Once you click add, the element will be created.

Blank Element

Now the empty element is created, all that is needed is to add the relevant XML to either disable or remove the button.

Disabling a button

For this example, we shall be disabling the EPT Change button from the Project Centre ribbon. To do so we need to know the ID of the item as defined in the ribbon so we can build up some XML that defines what we want to do to that item. To find the ID, we need to look through the PWARibbon.xml file, which can be a bit daunting, but after a while you will understand the structure and finding the Id’s will become simple.

SharePoint ribbon customisations use a defined XML schema which describes the structure and behaviour of the ribbon and the items that make it up. In order to disable the EPT Change button, we need to override the current structure and behaviour to change the configuration of what the button will do, in this case, pointing to a command that doesn’t exist.  In doing so, the ribbon will disable the button for us, giving us the desired effect.

To get the various attributes of the button, the PWARibbon.XML is your friend, containing all the configuration information you will need. In this case I have taken the configuration of the button and changed the command to point at a non existent command, which will cause the button to be disabled. This XML then needs to be put in the Element.xml file ready to be built, but more on that later.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
	<CustomAction
			Id="Ribbon.ContextualTabs.ProjectCenter.Home.ChangeProjectType.Change"
			Location="CommandUI.Ribbon"
			Title="Disables the EPT Change button in the Project Center Ribbon">
		<CommandUIExtension>
			<CommandUIDefinitions>
				<CommandUIDefinition Location="Ribbon.ContextualTabs.ProjectCenter.Home.ChangeProjectType.Change">
					<Button
						Id="Ribbon.ContextualTabs.ProjectCenter.Home.ChangeProjectType.Change"
						Command="ChangeReplacement"
						Sequence="10"
						Image16by16="/_layouts/$Resources:core,Language;/images/ps16x16.png"
						Image16by16Top="-112"
						Image16by16Left="-190"
						Image32by32="/_layouts/$Resources:core,Language;/images/ps32x32.png"
						Image32by32Top="-352"
						Image32by32Left="-96"
						LabelText="$Resources:pwafeatures,WEBPARTS_PROJECTCENTERPART_CM_CHANGE"
						TemplateAlias="o1"
						ToolTipTitle="$Resources:pwafeatures,PAGE_PDP_CM_CHANGE_WORKFLOW"
						ToolTipDescription="$Resources:pwafeatures,SUPER_TOOLTIP_CHANGE_PROJECT_TYPE"
						/>
				</CommandUIDefinition>
			</CommandUIDefinitions>
		</CommandUIExtension>
	</CustomAction>
</Elements>

Removing a button

The XML code required to remove a button is simpler. Instead of defining the XML for the whole button, all that is required is to redefine the CommandUIDefinition as per below.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
	<CustomAction
			Id="Ribbon.ContextualTabs.ProjectCenter.Home.ChangeProjectType.Change"
			Location="CommandUI.Ribbon">
		<CommandUIExtension>
			<CommandUIDefinitions>
				<CommandUIDefinition Location="Ribbon.ContextualTabs.ProjectCenter.Home.ChangeProjectType.Change" />
			</CommandUIDefinitions>
		</CommandUIExtension>
	</CustomAction>
</Elements>

When PWA parses the XML it uses this to remove the button as key items are not defined. Once again, all that is required to remove the button is to move this XML into the Elements.XML file and save ready for building.

In both cases, if you wish to hide or disable more than one button, you will need to duplicate the Custom Action mark up and change as necessary for each button.

How to Build

Finally once the configuration is completed, all that is required is to build and deploy the solution. To do so, right click on the project name and choose build, if everything is ok, you should see something similar to this in the build output:

Build Succeeded

If the build fails, then there may be a problem in your code. I have packaged the code up I used to build this post into a zip file which is available from my Skydrive account so you can compare or copy.

Once the build is successful you can deploy the solution by right clicking on the solution name and choosing deploy. VS 2010 will then deploy the solution to the site you entered for debugging and activate the solution in the site collection.

Activate Feature

Once the solution has been activated, you should see the changes to the ribbon in Project Center.

As you can see from above, creating a custom feature to hide or disabling buttons in the ribbon is relatively simple once you have the basic structure in place. Hopefully this post has explained how to build these customisations for use in your next project or internal implementation.

Hiding & Disabling ribbon items in Project Server, Part I

December 7, 2011 Leave a comment

Recently I have been working on a number of projects where the requirement to disable ribbon commands in Project Server has come up again and again. There are a couple of posts out there around modifying the ribbon, but they tend to focus on adding new items, not removing or disabling them, so I thought I would post something covering it. Of course, before you look at disabling the ribbon item through a customisation, you should look to see if the item can be disabled using the Project Server security model first.

What you need to know about the ribbon

If you are going to do any work on the ribbon, you need to be aware of a couple of things, firstly for performance reasons the ribbon is cached client side, which makes it really really painful to work with as your changes may not be visible straight away. To get around this, I found using the InPrivate mode of Internet Explorer stopped the client side caching and ensured my ribbon changes were visible.

Secondly, if you are going to hide or disable a ribbon item you need to know the ID of the item. Both SharePoint and Project Server have xml configuration files that define the structure of the ribbons, for SharePoint the ribbon structure is defined in a number of files, but the main one is CMDUI.XML located in {SharePointRoot}TEMPLATE\GLOBAL\XML\CMDUI.XML. For Project Server, the ribbon definitions are kept in the PWACONFIG.XML file located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\PWARibbon\listtemplates. The file itself contains the configuration of each button within the PWA app, including the name, image, command to be fired when clicked and references to the tooltips etc.

Example of PWACONFIG.XML

Finally, in the case of Project Server, you need to make sure you find the correct Id, things like the Timesheet ribbon have different id’s depending on whether the timesheet is running in Single Entry Mode, or normal timesheet mode.

To disable or hide? That is the question…

There are two schools of thought when disabling commands in SharePoint and therefore Project Server, to disable or hide the buttons. Hiding the buttons will remove the button completely from the ribbon, whereas disabling the button will leave the button on the ribbon, but in a state that cannot be clicked, thus stopping the functionality the item provides.

Normal Normal Ribbon
Disabled Disabled button on ribbon
Hidden Hidden button on ribbon

 

As you can see from above, the disabling route will be less confusing and will lead to a more consistent user experience for end users, but there are still situations where hiding might be the best route to go (I have a couple of customers that preferred hiding to disabling).

In the next post, we will look at how hide and disable a button using Visual Studio and some SharePoint features.

ProjectUID Filter Provider for Reporting Services Viewer Web Part

October 9, 2011 4 comments

Visual Studio 2010 - Custom Web partA couple of months ago, I was wondering if there was a simple way to show project reports automatically within a project workspace. The problem seems quite simple at first, all you need to do is work out which workspace you are in, then pass that value into the Reporting Services viewer web part as a web part connection. After a bit of experimenting with the out of the box web part filter providers, jQuery and other black magic, I quickly came to the conclusion that this wasn’t going to be an easy ask and so cracked open my old friend, Visual Studio 2010.

A couple of hours later (yes, it really did take me that long), I came up with a web part which I have called the ProjectUID Filter Provider for Reporting Services Viewer Web part. To use it you simply drop it onto a Project workspace, the web part will determine the ProjectUID of project the workspace is linked to and then make that available via a web part connection that the Reporting Services Viewer can consume.

Once installed, the web part is available for use in the custom category of the web part gallery.

Web part in the web part gallery

When added to a workspace, the web part is very minimalistic with the following chrome in edit mode and nothing in the normal rendering mode.

ProjectUID web part chrome

If the workspace you are adding the web part to is not connected to a Project, or is not a Project workspace at all, then an error message will be displayed.

To utilise the filter, add a Reporting Services Viewer web part onto your project workspace. In this example I have added a single Reporting Services Viewer web part and configured it to render the Project Status Report from the Project Demo and Evaluation Pack.

Report Viewer Web Part

Next we need to connect the filter provider web parts together, to do this select the context menu for the Reporting Services Viewer Web part, then choose Connections > Get Report Parameters From > ProjectUID Filter Provider for Reporting…

Connecting the web parts

A dialog box will then be displayed allowing you to wire these together, which will default to the ProjectUID. Click on Finish and the web parts will be connected.

Configure Connection

Once you are happy with the page and stopped editing the Project Status Report will render automatically using the ProjectUID passed in from the Filter Provider for Reporting Services Viewer Web part.

The final connected webpart

Of course, the real value of this web part comes into its own when you have more than one report on the page that you wish to render for the specific project. By creating multiple web part connections you can supply the ProjectUID to other Report Viewer web parts.

Now, as I mentioned above I have been sitting on this web part for a few months, why you may ask? Well, for me the killer use of the web part would be to use it in a Project Workspace template, so you could template the reporting dashboard. Unfortunately though if you were to configure the web part connections and create a template, the connections are lost due to the way SharePoint works Sad smile There are solutions to this, which are quite complex and involve event receivers, which I haven’t had a chance to look at in detail just yet. So please be aware of this limitation if you choose to use the web part.  The reason I decided to release the web part now was to help a Project forum user that was after this very capability.

The web part and associated source code can be downloaded from my Skydrive account by clicking below. As usual, this is provided as is, with no warranties or support and use at your own risk etc etc.

Download from SkyDrive

ProjectUID Filter Provider for Reporting Services Viewer

Of course, if you find the web part useful, or wish to suggest changes, please do not hesitate to contact me.

Microsoft PowerShell Command Builder

October 7, 2011 3 comments

At the SharePoint Conference in Anaheim, Microsoft released a pretty nifty PowerShell Command Builder for SharePoint. Whilst it doesn’t look to support Project Server PowerShell commands just yet, it does support SharePoint Server 2010 which as Project Server practitioners we all need to roll our sleeves up and do something to now and again.

PowerShell Command Builder Design Surface

The tool itself uses a handy drag and drop interface to select what you wish to do and then prompts you to enter the relevant information for the command. When your finished you can simply copy it to your clipboard to paste into the SharePoint PowerShell window.

PowerShell Command Builder - Add Farm Solution

The SharePoint PowerShell Command Builder is built in Silverlight 4  and can be accessed at http://www.microsoft.com/resources/TechNet/en-us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html. There is also a handy getting started guide here.

Update: I just noticed that if you right click on the Command Builder, you get the option to install it locally.

Install on your computer

Speaking at SharePoint Saturday Melbourne–22nd October 2011

September 29, 2011 Leave a comment

SharePoint Saturday Melbourne is coming up again, being held on the 22nd October in Melbourne’s CBD. For those of you that don’t know , or haven’t heard about SharePoint Saturday here is a definition from the SharePointSatuday.org site:

Join SharePoint architects, developers, business users and other professionals that work with Microsoft SharePoint Server 2010 for a ‘SharePoint Saturday’ event. SharePoint Saturday is an educational, informative & lively day filled with sessions from respected SharePoint professionals & MVPs, covering a wide variety of SharePoint-orientated topics. SharePoint Saturday is FREE, open to the public and is your local chance to immerse yourself in SharePoint!

The speaker line up is top notch, with at least two SharePoint 2010 MCM’s, several MVP’s and a number of Microsoft speakers all chomping at the bit to spread the SharePoint word Smile

This year I am pleased to have been given the opportunity to spread the Project Server Love once again, presenting a session entitled ‘Leveraging Project Server 2010 for SharePoint Governance and Lifecycle Management’. The session will showcase the SharePoint Lifecycle Management solution recently released by Microsoft and provide a glimpse of how this can be leveraged to improve governance and lifecycle management in your organisation.

Tickets for SharePoint Saturday Melbourne are available from http://spsmel11.eventbrite.com/

Tech Ed 2011–Wrap up and resources

September 5, 2011 Leave a comment

imageLast week I was lucky enough to present at Tech Ed Australia twice, once on an Ask the Experts panel for AvePoint and again presenting a full on breakout session along with Brian Farnhill called The SharePoint Developers Guide to Project Server 2010.

The official slide deck for the breakout session, and video / screencast will be available to view at (once processed): http://channel9.msdn.com/Events/TechEd/Australia/Tech-Ed-Australia-2011/OFS310.

I have also uploaded the original slide deck, to SlideShare which is embedded below, which includes all the notes and can be downloaded to make the most of those all important resource slide links.

 

In the session there was a number of code examples, the source code for each is available from the links below:

  • Demand management workflow – example of the workflow and associated Playbooks file for Project Server demand management set up
  • PSI – Example web parts to read project data and create project tasks via the PSI
  • Project template – Project web template and codified content type overrides.

I will be taking some of Brian’s code and adding it to some bits I have been tinkering with in the coming weeks for a series of blog posts. Speaking at TechEd was both daunting and exhilarating, requiring a significant amount of preparation. Now that it’s over, normal blog post and newsgroup transmission should resume Smile

Less than two weeks to go…

August 19, 2011 Leave a comment

blogBling_150x150_02It’s less than two weeks until TechEd Australia, and I have been hard at work with Brian Farnhill  putting the finishing touches to the presentation and demonstrations.

For those of you coming along, I will be taking part in two sessions:

OFS310 The SharePoint Developers Guide to Project Server 2010

Friday 2nd September – 9:45am – 11:00am

It’s just meant to be – Project Server and SharePoint server are better together, and this is the session that will show you why. Come and join us as we take you on a tour showing how the two products work together, and how you can deliver better solutions by integrating the two. Get to know how developers can leverage both of these great tools together and how you can deliver more value, what the features of the tools can offer and what you need to know as a developer to start solving real world business problems.

AIT001 | Ask a SharePoint Expert: Q&A Panel (End / Business Users)

Tuesday 30th August – 6:30pm – 7:00pm

Join the SharePoint End / Business user ‘experts Alexander Burton. Dan Holme, Ben Walters & Bhavik Merchant for a open forum Q&A panel in the SharePoint Interactive Theatre in the Expo hall, sponsored by AvePoint.

Finally, it would be a crime to miss out on fellow Project MVP, Marc Soester’s session. Marc is a fantastic speaker and his sessions always entertaining and informative.

OFS311 BI and Reporting using Project Server and SharePoint

Thursday 1st September – 3:30pm – 4:45pm

One of the main challenges organisations face is giving users the flexibility to report against Project, Resource and Portfolio information. This session will give you the insight on how you can take advantage of the great reporting features in Microsoft Project Server 2010 and Microsoft SharePoint Server 2010. By utilising Microsoft Project Servers build in Data Warehouse in combination with the SharePoint Business Intelligence tools, Project Server delivers what your Project team and your Executives require.

Learn how users are able to generate their own ad hoc reports minimising the overall cost and effort to produce meaningful reports. This session will give you a deep dive on how to manage projects, Resource and portfolio dashboards by creating Key Performance Indicator (KPI) reports using PerformancePoint Services, Excel Services and Power Pivot utilising Microsoft SQL Server and Microsoft Analysis Services 2008 R2.

I will be at TechEd Australia all week, so if you have any questions, or would like to catch up to see some more of Project Server, please do not hesitate to contact me.

Project Server Service Pack 1–Two handy SharePoint Features

August 3, 2011 Leave a comment

With the introduction of Service Pack 1 for Project Server and SharePoint in late June, in addition to the raft of bug fixes, a number of new features were included. The Project product team has as usual, done a diligent job in communicating these changes and I am not going to recap what they have already covered. Instead I am going to look at two new features of SharePoint that will no doubt benefit users and administrators of Project Server.

Site Recycle Bin

With WSS 3.0, Microsoft introduced a recycle bin capability that allowed items that had previously been deleted accidently to be captured in a recycle bin, allowing users, or site collection administrators to restore those items if required. Whilst the recycle bin captured pretty much everything SharePoint could throw at it, one glaring omission was that it couldn’t capture sites natively. With the introduction of SharePoint 2010 SP1, all sites that are deleted via Site Actions> Delete Site are now captured in the Site Collection Recycle Bin, allowing site collection administrators to recover any site deleted accidently.

Delete Site

Site Collection Recycle Bin

When I first heard of this feature I was keen to see how Project Server would work with it. As you are aware, Project Server allows you to save backups of various settings into the Archive database via a scheduled or administrative backup. However, this backup does not include the workspaces. Typically if you accidently delete a workspace, you need to do a database restore and recover the site accidently deleted. So when I heard this feature was coming, I was pleased to know there was a quick and convenient option to restore the sites should the need arise.

However, it appears there is a Project Server related ‘gotcha’ with this feature. If you choose to delete a site via the Server Settings > Delete Enterprise Objects of Project Server by checking the ‘Delete the associated Microsoft SharePoint Foundation Sites?’ option, the site will not captured in the Site Collection Recycle Bin.

Server Settings - Delete Enterprise Objects

Only those sites that are deleted via the Project Workspaces Site Actions > Delete Site option are. I am not sure why this is the case, but based on this I would suggest that any administrators that use the Delete Enterprise Objects functionality and usually choose to delete the associated workspace at the time of deletion choose not to check the ‘Delete the associated Microsoft SharePoint Foundation Sites?’ option and instead manually delete the site, giving an option to restore from the recycle bin should it be needed.

Storage Metrics

The second feature I wanted to look at was is called Storage Metrics This feature provides an overview of the storage being used by the sites and folders within a Site Collection allowing an administrator to see which sites are storing too much data within a site or if you are using quotas, which sites need archiving to ensure the quota is not breached.

Site Collection Storage Metrics

I can personally think of several customers that would benefit from the ability to easily see just how big certain project’s workspaces are becoming.

SharePoint Saturday Sydney–Saturday 6th August 2011

July 23, 2011 Leave a comment

1378289501-5I am pleased to announce that I will be spreading the Project Server Love at the forthcoming SharePoint Saturday Sydney with a session entitled ‘Leveraging Project Server 2010 for SharePoint Governance and Lifecycle Management’. The session will showcase the new SharePoint Lifecycle Management solution recently released by Microsoft and provide a glimpse of how this can be leveraged to improve governance and lifecycle management in your organisation.

As like all SharePoint Saturday’s attendance is free and the content top notch. You can register for SharePoint Saturday Sydney at http://spssyd11.eventbrite.com/.

Follow

Get every new post delivered to your Inbox.

Join 271 other followers