ResourcesCheck Method

Description

The PDS determines whether the resources specified by an ID exist in the Enterprise Resource Pool of Microsoft Office Project Server 2003. ResourcesCheck also verifies that a proposed new resource name is unique in Project Server, or that a specified Windows account is unique and valid.

Syntax

<Request>
   <ResourcesCheck>
      <Resource>
         <ResourceUID></ResourceUID>
         <ResourceName></ResourceName>
         <ResourceNTAccount></ResourceNTAccount>
      </Resource>
   </ResourcesCheck>
</Request>

Parameters

ResourceUID

Optional. The ID of the resource to check.

ResourceName

Optional. Required if ResourceNTAccount is not specified. The name of the resource to check.

ResourceNTAccount

Optional. Required if ResourceName is not specified. The Windows account associated with a Project Server account.

Return Value

If the call is successful, and if each ResourceName or ResourceNTAccount matches the ResourceUID, the PDS returns a successful HRESULT and STATUS with the user name making the request.

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

The PDS returns a successful HRESULT and STATUS and the user name, along with the specified resource parameters and ResourceStatus, if any of the following conditions occur:

  • ResourceUID does not match ResourceName.

  • ResourceNTAccount is invalid.

  • ResourceNTAccount is not unique.

  • ResourceName is not unique.

See Error Codes for a list of possible ResourceStatus values.

<Reply>
   <HRESULT></HRESULT>
   <STATUS></STATUS>
   <UserName></UserName>
   <ResourcesCheck>
      <Resource>
         <ResourceUID></ResourceUID>
         <ResourceName></ResourceName>
         <ResourceNTAccount></ResourceNTAccount>
         <ResourceStatus></ResourceStatus>
      </Resource>
      . . .
   </ResourcesCheck>
<Reply>

Remarks

ResourcesCheck requires either ResouceName or ResourceNTAccount. If ResourceUID is included, the PDS checks an existing resource.

The PDS also checks ResourceName to determine whether characters and formatting are valid, and whether the name is unique in Project Server. Invalid characters in a resource name are as follows: "[", "]", and leading or trailing spaces.

If ResourceNTAccount is included, the PDS determines whether the Windows account is unique, and whether it is already associated with a Project Server resource. When ResourcesCheck includes*****ResourceNTAccount*, the user can avoid creating multiple resources with the same name or Windows account, or creating invalid names or Windows accounts.