This documentation is archived and is not being maintained.

What's New in Project 2003 for Developers

Office 2003
 

Uma Subramanian
LaDonna Carpenter
Microsoft Corporation

July 2004

Applies to:
    Microsoft Office Project Standard 2003
    Microsoft Office Project Professional 2003
    Microsoft Office Project Web Access 2003
    Microsoft Office Project Server 2003

Summary: Learn about major changes and news for Project developers, and explore how to transition from previous versions of Project to Project 2003 and the Microsoft Office Project 2003 SDK. (23 printed pages)

Contents

Introduction
Product Highlights
Documentation Highlights
Changes in Project 2003 for Developers
Enterprise Global Outline Code Restrictions
Project Event Enhancements
Component Object Model Add-ins
Primary Interop Assembly for Project 2003
Resources for using the Project Object Model
Changes in the Project Server Database Schema: Extending the MSP_VIEW Tables
Project Data Service Enhancements
PDS Extension Enhancements
Customizing the Project Guide
Conclusion

Introduction

Microsoft Office Project 2003 is a milestone for Project users and developers. When used with Project Server 2003 and Microsoft Office Project Web Access, Project Professional 2003 provides enterprise project management (EPM) capabilities that enable organizations to manage their project portfolio effectively, establish standards and best practices, centrally manage resources based on skills and availability, and enable effective communication and collaboration within project teams. An extensible, enterprise-scale architecture provides solid integration with other line-of-business (LOB) systems, forming a foundation for building EPM solutions.

This article discusses major changes and news for Project developers who are transitioning to Project 2003 and the Project 2003 Software Development Kit (SDK). The Microsoft Office Project 2003 SDK, which includes documentation and samples, is available in the MSDN Library. The Project 2003 SDK download (pj11SDK2003.exe) is also available in the Microsoft Download Center.

Product Highlights

This section introduces the major highlights in Project 2003 for developers, including the following:

  • Project Guide The Project Guide offers improved programmability in the form of relative-path support: custom Project Guide solution files no longer require hard-coded absolute paths. The Project Guide also offers improved toolbar navigation for "Next Steps & Related Activities", and content additions include a printing wizard, the ability to show risks, and updates to reflect extended features in Project 2003.
  • Object model The Project object model is extended to provide basic support for outline codes, Project Guide theming support, improved Project Guide/Task Pane interoperability, improved eventing, and other updates to reflect extended features in Project 2003 (including privacy and COM add-ins). Also, the Primary Interop Assembly (PIA), which allows developers to automate Project 2003 by using managed code, is installed with Project 2003.
  • Project Data Service (PDS) Microsoft Office Project Server 2003 includes new and updated PDS APIs, and the new Service for Enterprise Data Maintenance (EDM) for higher-level programmatic management of enterprise projects, resources, and custom fields. The new PDS methods provide better support for creating projects, working with timesheets, and for creating and editing enterprise resource pools, custom fields, and outline codes. They also help to load and synchronize resource information from Active Directory.
  • Enhancements from Microsoft Windows SharePoint Services   

    Microsoft Office Project Server extends Microsoft Windows SharePoint Services through modifications to default Windows SharePoint Services templates. The template model is more robust and maintainable in Windows SharePoint Services version 2.0 than it was in SharePoint Team Services version 1.0.

    Also, Project Server 2003 offers six Web Parts to augment Windows SharePoint Services sites with Project Server functionality.

    Note   Web Parts are components for building Web sites that are designed to enable effective collaboration of team members within and between organizations. Web Parts are redesigned in Microsoft SharePoint Products and Technologies 2003 to take advantage of the performance, stability, security, and ease of development of the Microsoft .NET Framework.

    For more information about Web Parts, see Project Server 2003 Web Parts and URL Options in the Microsoft Office Project 2003 SDK.

  • New Sample database Project Server 2003 offers a new Sample database that includes projects, tasks, resources, and assignments, and enables you to view and interact with the data through Project Professional and Project Web Access. You can use the Sample database as a tool to help you learn EPM using Project 2003. Experiment with the data stored in Sample, and use the database objects as models for your own database. The database can be found by reading the pjsvr.chm file and sampledb.htm file on the Microsoft Office Project Server 2003 CD.

Documentation Highlights

This section introduces the major highlights in Project 2003 developer documentation, which include the following:

  • Solution Starters in the Project 2003 SDK Learn about the latest technologies for client- and server-based solutions using the Project 2003 SDK. The SDK contains documentation, tools, and sample applications called solution starters to help customize Project 2003, and to extend and integrate Project Server 2003 with a wide variety of desktop and business applications for enterprise project management.

    The Project Server 2003 Solution Starters include a workflow application for Microsoft BizTalk Server, extensions to integrate with the Siebel CRM (Customer Relationship Management) application, samples that show how to extend the OLAP cube for Portfolio Analyzer, and a solution to implement enterprise roll-up and reporting across multiple Project Server sites with a single query point.

  • XML Schema Reference For convenient access and ease of use, the XML Schema Reference (pjxml.chm) that is installed with Project is now included in the Microsoft Office Project 2003 SDK.
  • Project 2003 Database Schema The diagrams that describe the relationships between tables and fields in the Microsoft Office Project 2003 database are available for download.
  • Project 2003 In-Box Documentation Documentation about various Project data formats and setup scenarios that can be used out-of-the-box are available for download. This documentation includes PjDB.htm, PjSvrDB.htm, PjXML.chm and PjOLEDB.htm.
  • Samples, samples, samples Looking for samples to develop Project applications in managed code? You can find three managed code samples in the Project developer documentation. A PDS Extension template in C, a managed code add-in template using the Primary Interop Assembly (PIA), and a Project Initiation sample written in C that integrates Microsoft Office InfoPath 2003 and Project Server 2003. Check the sites periodically for more new samples and related articles.
  • Where to begin If you are new to Project development, or if you are planning a new solution that involves Project, the article Getting Started: Developing with Project 2003 provides an overview of the technologies for client-based and server-based development.
  • You can also find more information about Project 2003 documentation and related downloads on the Project Web site on Microsoft Office Online and the Microsoft Office Project Developer Center.

Changes in Project 2003 for Developers

This section covers changes for Project developers who are moving their development to Project 2003 and the Microsoft Office Project 2003 SDK.

Changes for Visual Basic for Applications Developers

The Project object model is extended to provide basic support for outline codes, Project Guide theming support, improved Project Guide/Task Pane interoperability, improved eventing, and other updates to reflect extended features in Project 2003 (including privacy and COM add-ins). Also, the Primary Interop Assembly (PIA), which allows developers to automate Project 2003 by using managed code, is installed with Project 2003. This section focuses on the new features and improvements in the Project 2003 object model.

Note   To provide backward compatibility, most of the replaced components are hidden rather than removed. The old code that uses the hidden components still works correctly without modification, even though the components do not show up by default in the object browser. You should, however, use the new objects, properties, and methods when you write new code.

Custom Outline Code Improvements

The Project 2003 object model is extended to enhance outline code development in Project 2003. The following section highlights the additions to the object model.

Outline Codes

The Outline Codes consist of three new primary objects and collections:

  • The OutlineCode object and OutlineCodes collection.
  • The LookupTableEntry object and LookupTable collection.
  • The CodeMaskLevel object and CodeMask collection.

OutlineCode Object

The OutlineCode object represents an outline code in Project 2003 and is a member of the OutlineCodes collection.

Table 1. OutlineCode object methods and properties

Methods Description
Delete Deletes the outline code.
Properties  
Application Returns an Application object. Read-only Application.
CodeMask This collection completely defines the code mask for that outline code. If the code shares a lookup table from another code, then this returns Nothing. Read-only CodeMask. The CodeMask collection is documented later in this section.
FieldID Specifies which outline code is used for the definition (e.g., pjCustomResourceEnterpriseOutlineCode14). Read-only PjCustomField.
Index Returns the index of the specified object within its containing collection. Read-only Long.
LinkedFieldID A value of -1 specifies that this outline code does not share a lookup table, which is the normal case. Otherwise, the value is one of the PjCustomField values and specifies which other outline code this outline code shares from. Read/write Long.
LookupTable This collection completely defines the values in the lookup table for that outline code. If the code shares a lookup table from another code, then this returns Nothing. Read-only LookupTable. The LookupTable collection is documented later in this section.
MatchGeneric This collection completely defines the values in the lookup table for that outline code. If the code shares a lookup table from another code, then this returns Nothing. Read-only LookupTable. The LookupTable collection is documented later in this section.
Name Returns or sets the user-defined name of the string. The user-defined name of the string is precisely what gets set by clicking Rename in the Customize Fields dialog box. Read/write String.
OnlyCompleteCodes True if only codes with values at all levels of the mask can be used. For enterprise codes, this is always False and non-writable. Read/write Boolean.
OnlyLeaves True if only outline code values without children can be selected. If there are no values in the lookup table, then this property must be False and non-writable. For non-enterprise codes, this is always False and non-writable. Read/write Boolean.
OnlyLookUpTableCodes True if only codes listed in the lookup table can be used. For enterprise codes, this is always True and non-writable. Read/write Boolean.
Parent Returns the parent of the object, which should always be the project where the code resides. Read-only Project.
RequiredCode True if the outline code must be present before save is allowed. If there are no values in the lookup table, then this property must be False and non-writable. For non-enterprise codes, this is always False and non-writable. Read/write Boolean.

OutlineCodes Collection

The OutlineCode object represents an outline code in Project 2003 and is a member of the OutlineCodes collection.

Table 2. OutlineCodes collection methods and properties

Methods Description
Add(FieldID, Name) Creates a new outline code. Fails if an outline code with the specified FieldID already exists. Returns the new OutlineCode object. FieldID specifies which outline code to use. Required PjCustomField. Name specifies the value that becomes the Name property of the OutlineCode object. Required String.
Properties  
Application Returns an Application object. Read-only Application.
Count Returns the number of items in the specified collection. Read-only Long.
Item Returns a single item from the collection. Read-only OutlineCode.

Note   First item's index is 1, not 0.

Parent Returns the parent of the object, which should always be the project. Read-only Project.

LookupTableEntry Object

The LookupTableEntry object represents an entry in a lookup table in Project 2003. The LookupTableEntry object is a member of the LookupTable collection.

Table 3. LookupTableEntry object methods and properties

Methods Description
Delete Deletes the entry and all of its children from the lookup table. Returns Nothing.
Properties  
Application Returns an Application object. Read-only Application.
Description Returns or sets the description of the individual entry. Read/write String.
FullName Returns the full name, including the values at all the levels. So using the earlier example for the Name property, this property would return USA.WA.Redmond. Read-only String.
Index Specifies the index of the current item. Read-only Long.
IsValid Returns True only if the entry conforms to the code mask, which is typically true. You can tell that an entry is not valid if it appears in red in the Define Lookup Table dialog box. Read-only Boolean.
Level Specifies the level of the entry. This can be between 1 and 255.

Note   The level can never be set to a number greater than 1 plus the level of the ParentEntry. Attempting to set this property to something higher results in an error. Read/write Long.

Name Returns or sets the name of the individual entry. For example, for an entry whose full name is USA.WA.Redmond, this property will be Redmond. Read/write String.
Parent Returns the parent of the object, which should always be the OutlineCode object in whose LookupTable this entry resides. Read-only OutlineCode.
ParentEntry Returns the LookupTableEntry of the parent. If the lookup table entry has level 1, then it has no parent, and this returns Nothing. Read-only OutlineCodeEntry.
UniqueID Specifies the UniqueID of the entry. Read-only Long.

LookupTable Collection

The LookupTable collection is a collection of the LookupTableEntry objects for a given OutlineCode.

Table 4. LookupTable collection methods and properties

Methods Description
AddChild(Name, [ParentUniqueID]) Adds a lookup table entry to the LookupTable collection. Returns a reference to the new object. Name specifies the name of the lookup table entry. Required String. ParentUniqueID, if specified, inserts the entry as the child of the entry with the specified UIDD. If not specified, then the entry is inserted at the top level. Checks are made that the entry with the specified UniqueID is in the correct lookup table. Optional Long.
Properties  
Application Returns an Application object. Read-only Application.
Count Returns the number of items in the specified collection. Read-only Long.
Item Returns a single item from the collection. Read-only LookupTableEntry.

Note   First item's index is 1, not 0.

Parent Returns the parent of the object, which should always be the OutlineCode object for which this specifies the lookup table. Read-only OutlineCode.

CodeMaskLevel Object

The CodeMaskLevel object represents a level in the code mask of an outline code definition. The CodeMaskLevel object is a member of the CodeMask collection.

Table 5. CodeMaskLevel object methods and properties

Methods Description
Delete Deletes the level. Returns Nothing.
Properties  
Application Returns an Application object. Read-only Application.
CodeMask This collection completely defines the code mask for that outline code. If the code shares a lookup table from another code, then this returns Nothing. Read-only CodeMask. The CodeMask collection is documented later in this section.
Index Specifies the index of the current item. Read-only Long.
Length Specifies the length for a given level. Can be the string Any or an integer value 1–255. Read/write Variant.
Level Returns the level, as it appears on the left of the grid in the Define Code Mask dialog box. Read-only Long.
LookupTable This collection completely defines the values in the lookup table for that outline code. If the code shares a lookup table from another code, then this returns Nothing. Read-only LookupTable. The LookupTable collection is documented later in this section.
Parent Returns the parent of the object, which should always be the OutlineCode object in whose CodeMask this level resides. Read-only OutlineCode.
Sequence Specifies the type of the sequence. Read/write PjCustomOutlineCodeSequence.
Separator The character that separates the level specified in Level from the next. Can be one of the following: . (period), - (minus sign), + (plus sign), or / (forward slash). Read/write String.

CodeMask Collection

The CodeMask collection is a collection of all the CodeMaskLevel objects that define the code mask for a given OutlineCode.

Table 6. CodeMask collection methods and properties

Methods Description
Add([Sequence], [Length], [Separator]) Creates a new level in the outline code mask at the end of the current mask.

Note   You cannot insert a level directly except at the end of the mask. You can mimic the same effect easily with a bit of Visual Basic for Applications (VBA) code, and this can save you project development time.

Returns the new CodeMaskLevel. Sequence specifies the type of the sequence. The default value is pjCustomOutlineCodeNumbers. Optional PjCustomOutlineCodeSequence. Length specifies the length of a given level. Can be the string Any or an integer value 1–255. The default value is Any. Optional Variant. Separator specifies the character that separates the level specified in Level from the next. Can be one of the following: . (period), - (minus sign), + (plus sign), or / (forward slash). Optional String.

Properties  
Application Returns an Application object. Read-only Application.
Count Returns the number of items in the specified collection. Read-only Long.
Item Returns a single item from the collection. Read-only CodeMaskLevel.

Note   First item's index is 1, not 0.

Parent Returns the parent of the object, which should always be the OutlineCode object for which this defines the lookup table. Read-only OutlineCode.

Enterprise Global Outline Code Restrictions

Microsoft Office Project 2003 does not allow local, non-enterprise outline codes in the enterprise global template under any circumstances, so you cannot edit local codes in the checked-out enterprise global template. Similarly, because checking out the enterprise global template is the only way to modify the enterprise outline codes on the server, you cannot edit enterprise outline codes except in the checked-out enterprise global template. When you are not allowed to edit, the following is implied:

  • All properties in all objects and collections described earlier are read-only.
  • All methods in all objects and collections described earlier fail if run.
Note   Because In-Memory Global is a composite of the enterprise global template and local Global.MPT, and because local Global.MPT can contain local outline codes, you can edit local outline codes in In-Memory Global.

These restrictions are summarized in the following table.

Table 7. Enterprise global restrictions

Outline codes In-memory global (such as GlobalOutlineCodes) Check-out enterprise global Projects
Enterprise codes Disallowed Allowed Disallowed
Local codes Allowed Disallowed Allowed

Project Event Enhancements

Project 2003 provides users with a more consistent event model. For example, the ProjectBeforeTaskChange and ProjectBeforeTaskChange2 events have been modified to behave similar to the ProjectBeforeResourceChange and ProjectBeforeResourceChange2 events.

In previous versions of Project, the ProjectBeforeResourceChange event fired when a user changed the Enterprise Resource Custom Field value on both the Resource Sheet and in the Resource Information dialog box. However, the ProjectBeforeTaskChange event fired only when the user changed the Enterprise Custom Field value from the Project Information dialog box and not from the Task views or Save As dialog box.

To provide a consistent experience for the application programmer, the ProjectBeforeTaskChange event in Project 2003 is modified to fire when the user modifies the Enterprise Custom Field from the Task views as well as in the following new locations:

  • The Project Information dialog box
  • The Save As enterprise dialog box

Component Object Model Add-ins

Component Object Model (COM) add-ins greatly extend an application by adding functionality that is not in the core product. Microsoft Office Project 2003 ships with eight COM add-ins, as well as an add-in for Microsoft Office Outlook. The Copy Picture to Office and the Outlook Integration add-ins are new for Microsoft Office Project 2003.

Note   The Outlook Integration add-in is actually an add-in for Outlook to allow tighter integration with Project Server 2003.

Primary Interop Assembly for Project 2003

For .NET to interact with COM objects, you need an interop assembly, which contains type definitions (not implementations) of types that have already been defined in the COM object. These type definitions allow managed applications to bind to the COM types at compile time and provide information to the common language runtime about how the types should be marshaled at run time.

The Primary Interop Assembly provided with Project 2003 allows .NET managed code to effectively work with the Microsoft Office Project 2003 Component Object Model. In .NET, if you register a connection to a COM object, an interop assembly (.dll) is automatically created if a Primary Interop Assembly is not available. However, this interop assembly is a guess by the .NET framework of how it should interact with the COM object. Dependencies, type libraries, and garbage collection will not work as well as a publisher-created Primary Interop Assembly. For this reason, it is strongly recommended you use a Primary Interop Assembly for any COM objects you work with in managed code.

Creating Managed Add-ins for Microsoft Office Project 2003 in the Microsoft Office Project 2003 SDK explains how to create and deploy a simple Project add-in using the Primary Interop Assembly.

Note   You must install the .NET Framework 1.0 with Service Pack 3 (SP3) or .NET Framework 1.1 before installing the Microsoft Office System products or the Primary Interop Assemblies will not be installed.

Resources for using the Project Object Model

New to Visual Basic for Applications development?

For details, see Lesson 47: VBA Overview in Module 4: Microsoft Project 2002 Training (Developers).

New to the Project object model?

For details, see the Microsoft Office Project Visual Basic Reference in Microsoft Office Project Standard Help or Microsoft Office Project Professional Help, or in the Microsoft Office Project 2003 SDK.

For a brief overview of the important objects and members, read Lesson 48: Project Objects in Module 4: Microsoft Project 2002 Training (Developers).

For complete information on the Project object model, see the Microsoft Office Project 2003 SDK.

Changes in the Project Server Database Schema: Extending the MSP_VIEW Tables

The Project Server database is the repository for enterprise project management data. The view tables that are included in the database serve as an excellent source for reporting data about the entire portfolio of projects in the enterprise. These tables present stable snapshots of each project plan based on the last time a project was published to Project Server and include a multitude of denormalized time phased data, allowing for advanced reporting capabilities outside the Project client.

View tables provide a consistent snapshot of approved data and denormalized storage of time phased data. The default view tables provide a multitude of data fields for use in Project Server as well as custom reports. If your custom reports require additional data, the MSP_VIEW tables can be extended with additional fields and even additional tables. By adding new fields to existing view tables, you can report on data important to your organization. The ability to specify additional MSP_VIEW tables allows you to simplify the creation of your reports by choosing the most effective data structure.

This section explains how you can add a field to an existing MSP_VIEW_ view table as well as add MSP_VIEW_ view tables to the Project Server database.

How to Add Fields to an Existing View Table

The current MSP_VIEW_ view tables, by default, do not include all of the available fields. These additional fields can be added to the MSP_VIEW_ view tables to extend the data presented by the Project Server database. The list of available fields can be found in the EXTVTBLS.SQL file.

Not all view tables can be extended. The following table lists the view tables that can be extended with additional fields.

Table 8. View tables that can be extended

Project tables
MSP_VIEW_PROJ_ASSN_TP_BY_DAY
MSP_VIEW_PROJ_PROJECTS_STD
MSP_VIEW_PROJ_TASK_TP_BY_DAY
Resource table
MSP_VIEW_RES_TP_BY_DAY

The EXTVTBLS.SQL file includes commands to alter the Project Server database with additional fields for the view tables listed earlier. You need to uncomment the appropriate SQL ALTER commands and then run the query against the Project Server database. By default, this script is commented out.

How to Add Fields

There are three main steps involved in extending the MSP_VIEW_ tables with additional fields:

  • Identify the tables that need to be extended and the fields that need to be added to the tables.
  • Modify EXTVTBLS.SQL and uncomment just the SQL ALTER records for those tables that contain the fields identified in step 1. Then, run the script to create the additional fields in the database.
  • In the QYLIBSQL.SQL file, which is located at \Program Files\Microsoft Office Project Server\Bin\ on the Project Server, add the fields to the proper query.

For example, currently the QYLIBSQL.SQL file includes the following query, as shown in Figure 1.

Figure 1. QYLIBSQL.SQL

After you run the script and alter the appropriate tables, Project Server 2003 should start publishing the new fields in that table.

How to Add View Tables to Project Server 2003

You can also extend the Project Server database by adding more MSP_VIEW_ view tables. There are 20 additional MSP_VIEW_ view tables you can add to the database. These tables and associated fields can be found commented out in the EXTVTBLS.SQL file.

Note   Creating additional view tables might result in longer time needed for view processing and require more space in the database.

The following table lists the MSP_VIEW_view tables that you can add to Project Server database.

Table 9. MSP_View_view tables that can be added to Project Server database

Project tables
MSP_VIEW_PROJ_ASSN_TP_BY_MINUTE
MSP_VIEW_PROJ_ASSN_TP_BY_HOUR
MSP_VIEW_PROJ_ASSN_TP_BY_WEEK
MSP_VIEW_PROJ_ASSN_TP_BY_MONTH
MSP_VIEW_PROJ_ASSN_TP_BY_MONTH
MSP_VIEW_PROJ_BASELINETASKSPLITS
MSP_VIEW_PROJ_RES_TP_BY_MINUTE
MSP_VIEW_PROJ_RES_TP_BY_HOUR
MSP_VIEW_PROJ_RES_TP_BY_DAY
MSP_VIEW_PROJ_RES_TP_BY_WEEK
MSP_VIEW_PROJ_RES_TP_BY_MONTH
MSP_VIEW_PROJ_TASK_TP_BY_MINUTE
MSP_VIEW_PROJ_TASK_TP_BY_HOUR
MSP_VIEW_PROJ_TASK_TP_BY_WEEK
MSP_VIEW_PROJ_TASK_TP_BY_MONTH
Resource tables
MSP_VIEW_RES_AVAILABILITY
MSP_VIEW_RES_COSTRATES
MSP_VIEW_RES_TP_BY_MINUTE
MSP_VIEW _RES_TP_BY_HOUR
MSP_VIEW _RES_TP_BY_WEEK
MSP_VIEW_RES_TP_BY_MONTH

How to Add Tables

There are three main steps involved in extending the MSP_VIEW_ tables with additional tables:

  1. Identify the additional tables you want to publish.
  2. Modify EXTVTBLS.SQL and uncomment only the tables identified in step 1. Then, run the script to create the tables in the Project Server database.
  3. Modify QYLIBSQL.SQL to uncomment the rows needed based on the tables from step 1. Running this script enables the queries for the newly added tables.

    Project Server 2003 should now start publishing data to the new tables.

Project Data Service Enhancements

Project management is a compilation of information and calculations that together provide a picture of a project's possible and actual progress. Project information is scattered at various places in most organizations. To facilitate interfaces to this information and to better support independent software vendors and partners, Project 2003 has expanded the set of Project Data Service (PDS) APIs originally delivered with Project 2002.

Project Server 2003 includes new and updated PDS APIs, and the new Service for Enterprise Data Maintenance (EDM) for higher-level programmatic management of enterprise projects, resources, and custom fields. The new PDS methods provide better support for creating projects, working with timesheets, and for creating and editing enterprise resource pools, custom fields, and outline codes. They also help to load and synchronize resource information from Active Directory.

A detailed Project Data Service Reference is included with the Microsoft Office Project 2003 SDK.

Note   Project Server 2003 can host multiple sites; Using the PDS with Multiple Project Server Sites shows how to set up the Web Service description language files for both the PDS and the Service for EDM.

API for Timesheet

This API provides a programmatic interface to Project Server assignment data, without a dependency on the Project Professional client or Project Web Access timesheet tool. This can all be accomplished by native calls to the Project Data Service. This API provides the ability to get assignments from Project Server, as well as edit those assignments (and programmatically update the project manager of existing edits) by using an external timesheet tool. This API does not provide the programmatic ability for the Project Manager to approve timesheets. The Project Manager still needs to log in to Project Web Access to approve transactions for the updates to travel back to the project plan.

The new Outlook add-in uses the API for Timesheet to communicate with the Project Server. The new PDS methods relating to Timesheet functionality are:

  • AssignmentsGet. Returns requested assignment information in XML format after validating the user and their permissions.
  • AssignmentsSave. Updates assignment information as specified after validating the user and their permissions.
  • AssignmentsProjectManagerUpdate. Sends the project managers updates of edits to the specified assignments after validating the user and their permissions.

API for Custom Fields

This new API provides a programmatic interface for editing the value lists for non-outline code Enterprise custom fields (such as an Enterprise Project Text Field with an associated value list).

This API includes two new PDS methods:

  • EnterpriseCustomFields. Returns the requested enterprise custom field value list structures after validating the user and their permissions.
  • EnterpriseCustomFieldsUpdate. Updates custom fields with the new definitions provided in the call after validating the user and their permissions.

Additionally, four existing PDS methods are now enhanced to support the functionality of this new API. These four methods are: ResourceCodeValues, ResourceCodeValuesUpdate, ProjectCodeValues, and ProjectCodeValuesUpdate. In addition, three related PDS methods are enhanced to support value list enterprise fields. These methods are ResourceCodeValues, ResourceCodeValuesUpdate, and ProjectCodeValues. In Microsoft Project 2002, these three methods explicitly excluded any enterprise custom field that had a value list.

API for Improved Resource Pool Creation

This new API allows you to create and edit enterprise resources programmatically to facilitate integration between other LOB systems and Project Server. For example, you can create a process that creates a new Enterprise Resource Pool resource programmatically without the use of the Project Professional 32-bit client.

The API includes one new method:

  • ResourcesAdd. Provides the capability of adding a new resource to the Enterprise Resource Pool programmatically. The programmatic creation of resource rates, resource calendars, resource availability, contoured baseline rates, and contoured baseline costs is not supported.

API for Improved Enterprise Custom Field Editing

In Project 2002, editing custom fields is difficult, even by using the PDS. The API for Improved Enterprise Custom Field Editing in Project Server 2003 makes it easier for you to integrate the value lists for enterprise outline codes with another business system, such as HR or Financial. Project Data Services allow you to add, delete, and update individual values in an enterprise outline code. However, the developer is still required to determine the business rules for how to transform the value list from another system into the value list for the Enterprise field. In Project Server 2003, you can pass in a list of hierarchical values and the PDS methods will transform that list into the correct form for an enterprise outline code value list.

Two new PDS methods have been added:

  • EnterpriseOutlineCodesHierarchical. Returns the specified enterprise outline code value lists after validating the user and their permissions.
  • EnterpriseOutlineCodeUpdate. Updates the value lists for enterprise outline codes with the value list specified after validating the user and their permissions.

API for Project Data Creation

In Project 2002, there is no direct way to create enterprise projects without using Project Professional. The PDS API for Project Data Creation allows you to create various elements of a project, such as creating a blank project, a project with tasks, resources, and assignments. You can do this by using a programmatic interface without using Project Professional.

Note   This API does not provide a server-side scheduling engine.

The API for Project Data Creation includes five new PDS methods:

  • ProjectData. Returns the same subset of the project definition (as per the project XML Schema) that the ProjectCreate method supports, after validating the user and their permissions.
  • ProjectCreate. Creates a new project in the Microsoft Project Server Database based on the project specification passed in, after validating the user and their permissions.
  • ProjectTasksCreate. Adds tasks directly into the Project Server database for the requested project, after validating the user and their permissions.
  • ProjectResourcesCreate. Creates local project resources or adds existing enterprise resources to a project, after validating the user and their permissions.
  • ProjectAssignmentsCreate. Creates assignments of resources to tasks within a project, after validating the user and their permissions. Enterprise Resource Summary Records, however, are not updated until the project is checked out and in through the Project Professional client.

API for Project Server User Maintenance

In Project Server 2003, there are new methods provided to maintain users and their membership in Project Server Groups. Project Server User membership in groups maps the user to predefined security/permission sets. Five new PDS methods accomplish this:

  • PSGroupsGet. Returns a list of all the Project Server security group names, after validating the requestor and their permissions.
  • PSNewUser. Adds one or more users (and their associated user information) to Project Server, after validating the requestor and their permissions.
  • PSGetUsersInGroup. Returns the users (and their associated user information) in a single specified Project Server security group, after validating the requestor and their permissions.
  • PSAddUsersToGroups. Adds one or more specified users to the set of Project Server security groups specified, after validating the requestor and their permissions.
  • PSDelUsersFromGroups. Removes one or more specified users from the set of Project Server security groups specified, after validating the requestor and their permissions.

In addition, two of the five methods (PSNewUser and PSGetUsersInGroup) provide the ability to get/set the user's associated Active Directory GUID and, therefore, provide the capability for Active Directory Enterprise Resource Pool Synchronization.

API for Project Outline Values

The PDS APIs for getting/setting Project Outline Values have been enhanced in Project Server 2003 and a new PDS method has been added to allow the retrieval of Project lists that have been filtered by specific project outline values. This capability was introduced primarily to support the new ability to filter projects in the Open dialog box (File menu) in Project Professional 2003.

The new PDS method is:

  • ProjectsOutlineValues. Returns a list of Projects (and some associated information) filtered by the specified outline value, after validating the user and their permissions.

The two enhanced methods are:

  • ProjectCodeValues. Returns a list of active enterprise outline code structures for a project, after validating the user and their permissions.
  • ProjectCodeValuesUpdate. Updates the enterprise outline codes for a project from the specified set of codes and their values, after validating the user and their permissions.

API to Delete Enterprise Resources

The Project 2003 PDS API includes three methods necessary to delete enterprise resources. Two methods are at the project level and one is at the Project Server Resource Pool level.

  • ResourcesDelete. Remove the enterprise resource if all the data integrity rules are met, after validating the user and their permissions. Data integrity rules will not allow the complete deletion of the resource. If all the integrity rules are met then the resource name is appended with a user specified suffix (like "removed 1-1-2003") and the CAN_LOGIN and COUNT_LICENSE fields are set to 0.
  • ProjectResourcesDelete. Removes resources from a project plan if the resources have no actual work or pending actual work (from the Web time entry tables), after validating the user and their permissions.
  • ProjectResourcesReplace. Replaces resources in a project plan if the resources have no actual work or pending actual work (from the Web time entry tables), after validating the user and their permissions.

API for Multi-Valued Custom Resource Outline Codes

Project Professional 2003 provides users with the ability to define and use multi-valued resource outline codes. One long-awaited use for this new capability is that we can now consolidate Resource Skill sets into one code field instead of in many code fields (as resources typically have more than one skill). Five existing PDS methods have been enhanced to offer the ability to create, modify and delete these codes, all using a programmatic interface without using Project Professional.

  • ResourcesAccess. Allows the user access to a specified (or filtered) set of resources, after validating the user and their permissions.
  • ResourcesAccessCompleted. Completes the user's access to a set of resources, after validating the user and their permissions.
  • ResourceCodeValues. Returns a list of the active enterprise outline code values for a resource, after validating the user and their permissions.
  • ResourceCodeValuesUpdate. Updates the enterprise outline codes for a resource, after validating the user and their permissions.
  • ResourcesStatus. Returns a list of resources (and some of their basic status information) that are accessible by the user, after validating the user and their permissions.

PDS Extension Enhancements

In Project Server 2002, Microsoft strongly urged third parties to use the PDS and PDS extensions to access and update Microsoft Project Server data. Use of the PDS and PDS extensions greatly reduces potential upward-compatibility issues and provides a consistent, robust security/permission authentication structure for any third-party developed products or customizations. The earlier versions of PDS extensions had several limitations with respect to access to the Microsoft Project Server Security Object and callbacks into the PDS.

In Project Server 2003, Project Data Services have been enhanced so that the parameters required by the PDS Extension public interface receive most of the parameter information through an XML structure. This enables more information to be passed into the extension without altering the public interface of the extension.

A PDS extension allows a third party to provide additional methods that are exposed through the PDS. The only requirements of a PDS extension are that it must be a registered COM object (or have a registered COM wrapper), it must support a single public interface, and it must be registered with the PDS.

Public Interface and Parameters

A new PDS extension supports the following public interface:

Public Function XMLRequestEx (ByVal sXML As String, ByVal sPDSInfoEx As 
    String, ByRef nHandled As Integer) As String

where the parameters are as follows:

  • sXML is the same string of XML that is passed into the PDS.
  • sPDSInfoEx is a string of XML passed into the extension that contains all of the additional information required for the extension. Figure 2 shows how this XML is formatted.

    Figure 2. PDSExtension XML   

  • nHandled is an integer that is the flag for the PDS to know whether the specific request has been handled by this extension.

Registering an Enhanced Project Data Service Extension

Every PDS extension must be a standard COM object and must be properly registered with COM (using regsvr32, for example). In addition, for the PDS to know which ProgIDs to call for each extension, each one must also be registered with the PDS. The registry setting should resemble the following example (Figure 3):

Figure 3. Registry setting

Customizing the Project Guide

The Project Guide offers improved programmability in the form of relative-path support: custom Project Guide solution files no longer require hard-coded absolute paths. The Project Guide also offers improved toolbar navigation for "Next Steps & Related Activities", and content additions include a printing wizard, the ability to show risks, and updates to reflect extended features in Project 2003.

Changes to the Project Guide for Microsoft Office Project 2003

In Project 2002, custom Project Guide solution files require hard-coded absolute paths. This means that users and organizations have to place the Project Guide content files in a single location on the network or on the local computer. If the path for these files changes, the Project Guide no longer works until every solution file is updated to reference the new location.

Project 2003 includes two new custom protocols that support relative paths for custom Project Guide files. The pgcontent:// protocol refers to the directory for the custom XML content schema such as custom_gbui.xml. The pgmainpage:// protocol refers to the directory for the custom functionality and layout page, for example custom_mainpage.htm. If you point Project to a main page on a network share such as \\CentralServer\CustomPG\Bavaria\custom_mainpage.htm, you can access other files in that directory and relative directories as follows:

pgmainpage://scripts.js  
     (resolves to \\CentralServer\CustomPG\Bavaria\scripts.js)
pgmainpage://subdirectory/sidepane.htm 
     (resolves to \\CentralServer\CustomPG\Bavaria\subdirectory\sidepane.htm)

To manually set the custom Project Guide directory paths in Project 2003, on the Tools menu, click Options. In the Options dialog box, click the Interface tab.

For the custom page directory, click Use a custom page, and then type the URL of the custom main page in the text box. For the custom schema directory, click Use custom content, and then type the URL of the custom XML file. To programmatically set the Project Guide directory paths, you can use the Project object model in Microsoft Visual Basic for Applications (VBA). For more information, see Defining the Project Guide.

Resources for Customizing the Project Guide

New to the Project Guide?

The Project Guide is a tool designed to enable novice and expert users to discover new features, and to assist novice users to quickly and easily create and organize projects. In addition, the Project Guide is fully customizable, so that an organization can change the content and behavior of the Project Guide to conform to their custom project management framework. The following figure shows the user interface elements of the default Project Guide.

Figure 4. Project Guide

For articles about customizing the Project Guide, see Project Guide 101 in the Microsoft Office Project 2003 SDK. Check the SDK frequently for updates and new content.

Following are some of the main articles on customizing the Project Guide:

  • "Customizing the Project Guide" introduces the Project Guide architecture and explains the common steps required to customize the Project Guide.
  • "Customizing the Microsoft Project Guide for Enterprise Team Builder Light" extends the Project Guide functionality using Project Data Service calls.
  • "Microsoft Project 2002 Training Courseware (Lesson 52)" has in-depth coverage of the Project Guide and how to customize it.
    Note   Most of the content discussed in this lesson still applies to Project 2003.

Conclusion

This article described important changes to Project desktop and server automation.

On the desktop, the most significant changes included:

  • Adding outline code support to the object model, allowing developers to programmatically manipulate enterprise level outline codes within Project Professional.
  • Adding a Primary Interop Assembly (PIA), enabling .NET programmers to run managed code against Project's COM objects.
  • Adding relative-path support to the Project Guide, enabling developers to create location-independent custom Project Guides.

On the server, the most significant changes include:

  • Enhancements to the Project Data Service, enabling access to Timesheets, Custom Fields, and Project outline values as well as allowing users to programmatically create project data.
  • Changes to the Project Server database schema.
Show: