Project Programmability

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.

April, 2007

  • Project Programmability and Business Intelligence

    Checking Errors

    Here is a great recommendation from Jim Corbin:

    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


  • Project Programmability and Business Intelligence

    April update of the Project 2007 SDK is now available on MSDN


    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: .
    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)

      • OLAPCubeSchemas.xls (dimensions, measures, and properties of the Project Server OLAP cubes)
      • XML data interchange schema for Project 2007 (mspdi_pj12.xsd plus supplemental schemas for enterprise custom fields)
      • Statusing schemas (ChangeList.xsd and SetAssignmentWorkData.xsd)
      • Project Portfolio Server 2007 Database Reference (AccountData and AccountIndex)
      • Redistribution license for the Microsoft.Office.Project.Server.Library.dll
      • SDK code samples:
        1. ChangeXML Utility: generate, validate, and test ChangeXML parameters for the UpdateStatus method
        2. Custom Web Parts: two samples; one uses the Microsoft.Office.Project.Server.PWA.dll assembly, and one does not
        3. Impersonation: two samples; a simple console application and the Impersonation Web Application
        4. Login Demo
        5. OLP Example
        6. Project Guide: default Project Guide files, and the sample Critical Path custom Project Guide updated for Project 2007
        7. Project Workspace
        8. ProjTool: a sample application to help generate data and test many of the PSI methods
        9. PSI Extensions: develop and test a custom PSI Web service
        10. Report Pack: seven sample reports using SQL Server Reporting Services 2005 (SP1)
        11. Test Event Handler
    • SDK Online: Project 2007 SDK in MSDN online library:
      • Object Model Maps: The Project 2007 VBA Reference was also recently posted on MSDN, along with four pages of the new Project object model maps. For example, click any object in Application and Projects Object Map to go to the topic for that object. You can also see the object model maps in VBA Help when you use Project Standard or Project Professional. In the Project Help window, click the Connection Status menu at the lower right, and then select Show content from Office Online.
    • Portal:  Project Developer Portal in the Office Developer Center on MSDN includes links to the Project 2007 SDK,  Project 2007 blogs, as well as the Project 2003 SDK.


    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.

  • Project Programmability and Business Intelligence

    Setting the Project Owner


    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.Fields.Add(new PSLibrary.Filter.Field(resUID));

      lo_filter.Criteria = new PSLibrary.Filter.FieldOperator(equal, nameColumn, ls_name);



      lo_resDS = lo_resWS.ReadResources(lo_filter.GetXml(), false);


      return (Guid)lo_resDS.Tables[lo_resDS.Resources.TableName].Rows[0][0];


    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.

    Chris Boyd

  • Project Programmability and Business Intelligence

    Project Conference


    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.

    Chris Boyd

Page 1 of 1 (4 items)
Recent Posts