Share via


GetResAllProjectsByProjectView Method

Description

Returns a list of projects for which a specified resource account has "See Projects in Project View" permission within a specified Project view using the Microsoft Office Project Server 2003 security object.

Syntax

Function GetResAllProjectsByProjectView( _
   ByVal res_id As Long, _
   ByVal project_view_id As Long _
) As String

Parameters

Parameter Description

res_id

Required Long. The resource account ID (WRES_ID).

project_view_id

Required Long. The project view ID, as in MSP_WEB_VIEW_REPORTS.WVIEW_ID.

Return Value

The GetResAllProjectsByProjectView method returns a comma-separated list of project IDs as a String value.

Example

The following example returns a list of projects where the resource can view tasks cost (WVIEW_ID = 16). The example is for Microsoft Visual Basic 6.0.

Dim sResult as String
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
sResult = oSec.GetResAllProjectsByPortfolioView(101, 16)
Set oSec = Nothing