ReadSchedulingContext method

Project.ReadSchedulingContext method

Office 2013 and later

Gets the scheduling context based on a set of projects and resources.

Namespace:  WebSvcProject
Assembly:  ProjectServerServices (in ProjectServerServices.dll)

[SoapDocumentMethodAttribute("", RequestNamespace = "", 
	ResponseNamespace = "", 
	Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public ProjectContextDataSet ReadSchedulingContext(
	Guid[] projectUids,
	Guid[] resourceUids


Type: []

An array of project GUIDs.

Type: []

An array of resource GUIDs.

Return value

Type: WebSvcProject.ProjectContextDataSet
Contains the scheduling context that is derived from the specified projects and resources.

Gets a list of projects that are related to specified projects or resources. A relationship exists if one of the following conditions is met:

  • Projects share enterprise resources (either those on the project team or in the input list).

  • Projects have interproject dependencies (cross-project links).

  • Projects share resources with or have cross-project links with projects that are related to projects in the input list (an indirect relationship).

Project Server Permissions




Allows a user to open the specified projects. Category permission.

Consider two projects that share one enterprise resource, as in the following table.

Project name and GUID

Resources and GUIDs



Resource1; d58fd816-d380-46e3-aff1-6cef617d32a2

Resource2; b3dab395-bc33-4dd7-a3a7-a45522857369




Resource1; d58fd816-d380-46e3-aff1-6cef617d32a2


In the following code fragment for a test application, WebSvcProject is an arbitrary name for a reference to the Project web service, and project is an initialized instance of the WebSvcProject.Project class.

    Guid[] projectUids = { new Guid("a9d03b87-37f1-473d-90f6-77ba3c521a40") };
    Guid[] resourceUids = null;
    WebSvcProject.ProjectContextDataSet dsProjectContext =
        project.ReadSchedulingContext(projectUids, resourceUids);
catch (SoapException ex)
    . . .

The value of the Relationship element in the SchedulingContextOut.txt file shows that Project2 is related to Project1 by a shared resource. If you add one or both resource GUIDs to the resourceUids array, the result is the same.


If you add both project GUIDs to the projectUids array, dsProjectContext is empty.

<?xml version="1.0" standalone="yes"?>
<ProjectContextDataSet xmlns="">
© 2015 Microsoft