This blog focuses on customizations and programming for Project Web App, Project Server, Project Professional and Project Standard. Includes User Interface (UI) customizations, Project Server Interface (PSI) and Visual Basic for Applications (VBA) Programming. It also covers Business Intelligence.
We are currently in the early stages of planning the next version of Project. To help plan out the work, we are using Project 2007. To begin, we needed to create a number of projects in bulk and decided to use the PSI to help out with the process. We already had the name for all the projects and the PMs who would be the owners. So, I created an application that read from a text file and set the PM as the project owner and some custom fields to be able to identify the projects.
It was important to set the project owner so that PM can easily access and manipulate the project plan created by the application. This is a fairly easy task when working with the project dataset. To set the project owner, set ProjectOwnerID to the GUID of the resource. The following method may help to look up the resource GUID:
private Guid GetResourceGuid(string ls_name)
WSResource.Resource lo_resWS =
WSResource.ResourceDataSet lo_resDS = new WSResource.ResourceDataSet();
string nameColumn = lo_resDS.Resources.RES_NAMEColumn.ColumnName;
string resUID = lo_resDS.Resources.RES_UIDColumn.ColumnName;
PSLibrary.Filter.FieldOperationType equal =
PSLibrary.Filter lo_filter = new PSLibrary.Filter();
lo_filter.FilterTableName = lo_resDS.Resources.TableName;
lo_filter.Criteria = new PSLibrary.Filter.FieldOperator(equal, nameColumn, ls_name);
lo_resDS = lo_resWS.ReadResources(lo_filter.GetXml(), false);
Acourse, I knew all the PMs were resources on the Project Server instance and did not trap for errors for trying to access the dataset if no rows existed. If you use this method in general, you should put a try catch around:
This method also uses the connection object that I described in an early post for connecting to the PSI.
There are two main places to check for configuration and runtime errors when you are developing solutions for Project Server. The Unified Logging Service (ULS) trace logs can be more detailed than the application event log.
· Application events In the Start menu on the Project Server computer, click Run, and then type eventvwr. In the left pane of the Event Viewer window, click Application to see the events logged by Project Server, Windows SharePoint Services, ASP.NET, SQL Server, custom event handlers, and other applications. The Project Server event sources include ProjectQueueService and pjevtsvc.
· ULS You can configure the ULS trace log to record specific or all categories and levels of activities in Project Server and SharePoint. To view the trace logs, you can use Windows Notepad, Microsoft Excel, or the Log Viewer add-in feature for SharePoint. Log Viewer is a useful download that is available from CodePlex.
To configure the ULS trace log for a specific Project category:
1. Open the SharePoint 3.0 Central Administration application, click Operations, and then click Diagnostic logging in the Logging and Reporting section.
2. In the Event Throttling section, select a specific category such as Project Server - Server-Side Events. If you select Project Server - General, all Project categories will be logged.
3. Select the Verbose level for the least critical event to report in the trace log.
Caution Run verbose logging only when you need it. Especially on a production server, select only a specific category. The size of logs can grow to be large. To turn off all logging, select the empty category and None for the trace log least critical event. To record relatively few events, select High or Monitorable.
4. Use the default path for the trace logs, for example, C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\. If you use the Log Viewer add-in for SharePoint, it looks for trace logs in the default path.
5. The default maximum number of log files to maintain is 96.
6. The default number of minutes to use a log file is 30. That is, ULS tracing creates a new log file after 30 minutes. Log files include the date and time in the filename, for example, SERVERNAME -20070424-1612.log.
To use the Log Viewer add-in for SharePoint:
1. Download and install the Log Viewer feature from CodePlex SharePoint 2007 Features. See the Releases tab for the list of downloads. The release notes include installation instructions.
2. The Log Viewer is a global feature. After it is installed, click Operations on the Central Administration page, and then click View Unified Logging Service in the Utilities section.
3. On the Unified Logging Service (ULS) Logs page, select a file to view, and then select the Project Server category. That shows all of the specific categories such as Project Server Queue, Project Server Server-Side Events, Project Server Reporting, and so forth.
4. To see all events in the ULS log, leave the trace severity drop-down list blank. If you select Verbose, that shows only the verbose level events.
5. Click Go.
Log Viewer add-in for SharePoint showing a ULS log for Project
I just wanted to give everyone a heads up about the upcoming Project Conference. Details can be found here:
There will be a Developer/IT Professional track that we will be presenting on a verity of development topics that cover the PSI, Events, Reporting and Project Client. I will provide further details about my presentation as I start to develop my slide decks.
The April update of the SDK is now available on MSDN. It includes many final versions of articles that have been published as posts on this blog.
· SDK Download: http://www.microsoft.com/downloads/details.aspx?FamilyId=2672F6F9-7028-4B30-99A2-18CB1EED1ABE&displaylang=en . The pj12ProjectSDK.exe download includes (new and updated items in blue bold):
o pjSDK2007.chm (conceptual topics and managed code reference – the same topics as on the MSDN online library)
o pj12ReportingDB.chm (Reporting database schema reference and Visio diagrams)
What’s new in pjSDK2007.chm and the online SDK:
In addition to new code samples and schemas in the download, the April update of the SDK includes 97 conceptual topics (28 new since the RTM release) and many updates in the managed code reference topics. Major new and updated conceptual topics include the following:
· XML Schema References for Project (15 topics; includes the ChangeList Schema Reference)
· Changes for Custom Project Guides
· Custom Fields in OLAP Cubes (in the Local and Enterprise Custom Fields topic)
· How to: Generate ChangeXML for Statusing Updates
· Project Server Report Pack (9 topics)
· Walkthrough: Creating a PSI Extension
· Walkthrough: Develop an Impersonation Web Application
Other updates include enumeration descriptions, PSI method permissions, TimesheetDataSet properties, and a VBA sample for Project Deliverables.
For related content, see the Office Developer Centers, SharePoint Developer Center, and the SharePoint Server 2007 Developer Portal.