Share via


OLP Sample Code for Project Server 2010

The Object Link Provider (OLP) in Project Server 2010 enables the management of the Project-specific lists in a project site (issues, risks, deliverables, documents, and custom lists) and integration of the SharePoint lists with Project Server. The OLP  has the same functionality as in Project Server 2007; however, you can use Windows Communication Foundation (WCF) to develop OLP solutions for Project Server 2010.

The attached code (OLP_Sample.zip) is a preview of an example that uses the CreateWebObjectLinks method, to be published in the next update of the Project 2010 SDK. Before you run the sample application, perform the following steps:

  1. Use Project Professional 2010 to create and publish a project with at least one task.

  2. Use Project Web App to open the project site.

  3. Create at least one issue or risk in the Issues or Risks SharePoint list of the project site.

  4. Change the OLP constructor values according to your example.

  5. Add a web service reference to https://localhost/pwa/_vti_bin/Lists.asmx, and name the reference WebSvcLists.

This example performs the following tasks:

  • Verifies that the project, task, and project site exist and gets their corresponding GUIDs.

  • Links a task and a SharePoint list item (in this case, an Issue).

  • Links a task and a generic object.

  • Gets the list of SharePoint items that are linked to a task and writes the contents of the ObjectLinkProvider dataSet dsLinkedObjects to an XML file.

  • Gets a list of generic items that are linked to a task.

  • Deletes the links to web objects.

For more information about how the sample code works, see Procedures 1-6 in How to: Use the OLP to Link an Object to a Task.

OLP_Sample.zip