Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ResourcesAccess Method

Office 2003

Description

The PDS enables user access to resources in Microsoft Office Project Server 2003. ResourcesAccess supports both Enterprise Resource Outline Code (EROC) values and Enterprise Resource Multi-Value (ERMV) codes.

Syntax

<Request>
   <ResourcesAccess>
      <SPID></SPID>
      <SPIDTimestamp></SPIDTimestamp>
      <ProjectID></ProjectID>
      <ProjectName></ProjectName>
      <Resource>
         <ResourceUID></ResourceUID>
         <ResourceName></ResourceName>
      </Resource>
      <Mode></Mode>
      <RBS></RBS>
      <IncludeParent></IncludeParent>
      <OutlineCodeValues>
         <OutlineCodeValue>    <!--For standard EROC values -->
            <UID></UID>
            <ValueUID></ValueUID>
         </OutlineCodeValue>
         <OutlineCodeValue>    <!--For ERMV codes -->
            <UID></UID>
            <Values>
               <ValueUID></ValueUID>
               <ValueUID></ValueUID>
            </Values>
         </OutlineCodeValue>
      </OutlineCodeValues>
      <MaxNumber></MaxNumber>
   </ResourcesAccess>
</Request>

Parameters

SPID

Required. The SQL Process ID.

SPIDTimestamp

Required. The SQL Process ID creation timestamp.

ProjectID

Optional. Allows access to the resources for the specified project ID.

ProjectName

Optional. Allows access to resources in the specified project name. 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).

ResourceUID

Optional. Allows access to the specified resource unique ID.

ResourceName

Optional. Allows access to the specified resource name.

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 ResourcesAccess multiple times. Values for Mode are as follows:

Value Description
0 Read-only access (default)
1 Read/write access
2 Read access + auto checkout
3 Read/write access + auto checkout

The resource must already be checked out in order to specify a Mode value of 1.

RBS

Optional. Filters the list based on the resource breakdown structure level of the resource. If specified, the PDS accesses resources below the specified RBS level. If RBS is specified, IncludeParent can also be specified.

IncludeParent

Optional. If IncludeParent is specified without RBS, the PDS returns an error. IncludeParent defaults to 0, and has valid values of 0 or 1. If IncludeParent is 1, the accessed set of resources includes all resources at or below the specified RBS level.

OutlineCodeValues

Optional. Filters the list based on outline codes. Contains an XML structure of one or more pair of data corresponding to the outline code value of the Enterprise Resource Outline Code field. If more than one pair is included, the filter combines the values as if they were in an AND statement.

MaxNumber

Optional. If MaxNumber is specified, and the total number of resources returned would be greater than MaxNumber, count and status are the only return values (no resource access is granted).

Return Value

If access to all requested resources is successful, the method returns a successful HRESULT and STATUS. The return value also contains the name and ID of the resource global. However, if access to one of the requested resources fails, access to all fails, and the return value includes each resource that failed and an error code. The return value includes a count of the total number of resources requested.

<Reply>
   <HRESULT></HRESULT>
   <STATUS></STATUS>
   <UserName></UserName>
   <ResourcesAccess>
      <Count></Count>
      <Mode></Mode>
      <ResGlobalID></ResGlobalID>
      <ResGlobalName></ResGlobalName>
   </ResourcesAccess>
</Reply>

Remarks

Request and reply elements that are new or changed since Microsoft Project 2002 are shown in bold.

The PDS checks Project Server security for the currently logged-on user, and determines whether that user has sufficient permission for the requested resources in the requested mode. If permissions are adequate, the PDS makes the appropriate entry or entries in the Resource Security table for each requested resource. Each resource must also be active. See The PDS and Project Server Security Architecture for more information about how Project Professional uses ResourcesAccess.

If the Mode is 2 or 3 (read or read/write with auto checkout), the PDS also marks the resource as checked out by the current user (assuming permissions for the current user are adequate). If ProjectID or ProjectName is specified, the PDS grants access to all of the enterprise resources in that particular project. If no parameters are specified, the PDS grants access to all resources that the currently logged-on user has access to.

The only required parameters are the SPID and the SPIDTimestamp. The PDS processes the optional parameters ProjectID, ProjectName, ResourceUID, and ResourceName according to the following rules:

  • If ProjectID is specified, the other three parameters (ProjectName, ResourceUID, and ResourceName) are ignored.

  • If ProjectName is specified, the remaining two parameters (ResourceUID and ResourceName) are ignored.

  • If ResourceUID is specified, ResourceName is ignored.

 

 

Show:
© 2015 Microsoft