ProjectsAccessCompleted Method

Description

Notifies the PDS that the user no longer requires access to projects in Microsoft Office Project Server 2003.

Syntax

<Request>
   <ProjectsAccessCompleted>
      <Mode></Mode>
      <SPID></SPID>
      <Project>
         <ProjectType></ProjectType>
         <ProjectID></ProjectID>
         <ProjectName></ProjectName>
         <ProjectSummaryRecord></ProjectSummaryRecord>
      </Project>
   </ProjectsAccessCompleted>
</Request>

Parameters

Mode

Optional. The default for Mode is 0. There is only one mode valid for the entire method call. If multiple modes are required, the client must call ProjectsAccessCompleted multiple times. Valid values for Mode in ProjectsAccessCompleted are as follows:

Mode Description
0 Read-only access (default)
1 Read/write access
5 Read access + auto checkin
6 Read/write access + auto checkin

SPID

Required. The SQL Process ID.

ProjectType

Optional. Valid values for ProjectType are as follows; the PDS ignores any other values:

Type Description
0 Regular project (default)
1 Project template
2 Global template
3 Resource global

If ProjectType is 2 or 3, the PDS ignores ProjectID and ProjectName, and clears the user’s access to the enterprise global template or resource global.

ProjectID* or *ProjectName

Optional. The PDS completes access to the specified project ID or project name. Either ProjectID or ProjectName is required if ProjectType is 0 or 1. If ProjectID is specified, the PDS ignores ProjectName.

ProjectName is the project name as stored in the PROJ_NAME field of the MSP_PROJECTS table (the concatenation of the project identifier and the version name, separated by a period).

ProjectSummaryRecord

Optional. Valid for a regular project and modes 5 or 6; otherwise, it is ignored. ProjectSummaryRecord contains an XML structure that represents the project summary record information that is posted to Project Server. Each ProjectSummaryRecord parameter is paired with the project identifier immediately preceding it.

Return Value

If all requested projects are successful, the method returns a successful HRESULT and STATUS. However, if one of the requested projects fails, they all fail and the return value includes each project that failed and an error code.

<Reply>
   <HRESULT></HRESULT>
   <STATUS></STATUS>
   <UserName></UserName>
</Reply>

Remarks

The PDS checks Project Server security for the currently logged-on user, and determines whether that user has sufficient permission for the project in the requested mode. If the user has permission, the PDS deletes the appropriate row or rows in the Project Security table for each requested project. If the Mode value is 5 or 6, the PDS also marks the project as checked-in.

If the Mode is 5 or 6, and the ProjectSummaryRecord parameter is specified, after the check-in is complete, the PDS starts the process that populates the project view tables for each checked-in project with the ProjectSummaryRecord parameter value. If the ProjectType is 2 (the enterprise global template) and the Mode is 5 or 6, the PDS also updates the custom field aliases in Project Server.

See The PDS and Project Server Security Architecture for information about how Microsoft Office Project Professional uses ProjectsAccessCompleted.

ProjectsAccessCompleted accepts multiple sets of the Project parameters.