GetResAllEntProjectsByTwoPermissions Method

Description

Returns the list of enterprise project IDs for which a specified resource has the two specified permissions using the Microsoft Office Project Server 2003 security object.

Syntax

Function GetResAllEntProjectsByTwoPermissions( _
   ByVal lCallerWResID As Long, _
   ByVal act_id1 As Long, _
   ByVal act_id2 As Long _
) As String

Parameters

Parameter Description

lCallerWResID

Required Long. The resource ID (WRES_ID).

act_id1

Required Long. Project permission 1.

act_id2

Required Long. Project permission 2.

Return Value

The GetResAllEntProjectsByTwoPermissions function comma-separated list of enterprise project IDs from the PROJ_ID in MSP_PROJECTS table as a String value.

Following is an example return value: "101,102,-1,103,104". In the example, 101 and 102 are the enterprise projects for which the resource has the first permission, and 103 and 104 are the enterprise projects for which the resource has the second permission.

Remarks

GetResAllEntProjectsByTwoPermissions has performance benefits, because it returns a list of projects for two permissions with one call.

For a list of permission IDs, see PDS Permissions in the Project Data Service reference.

Example

The following example is for Microsoft Visual Basic 6.0.

Dim sResult as String
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
sResult = oSec.GetResAllEntProjectsByTwoPermissions(122, 202, 1010)
Set oSec = Nothing