Admin.ReadDepartmentsByEntity Method

Reads the list of departments in Project Server for the specified entity.

Namespace:  [Admin Web service]
Service reference: http://ServerName:32843/[Project Service Application GUID]/PSI/Admin.svc
Web service reference: http://ServerName/ProjectServerName/_vti_bin/PSI/Admin.asmx?wsdl

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/Admin/ReadDepartmentsByEntity", RequestNamespace := "https://schemas.microsoft.com/office/project/server/webservices/Admin/",  _
    ResponseNamespace := "https://schemas.microsoft.com/office/project/server/webservices/Admin/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function ReadDepartmentsByEntity ( _
    entityUid As Guid, _
    entityTypeUid As Guid, _
    language As Integer _
) As DepartmentsDataSet
'Usage
Dim instance As Admin
Dim entityUid As Guid
Dim entityTypeUid As Guid
Dim language As Integer
Dim returnValue As DepartmentsDataSet

returnValue = instance.ReadDepartmentsByEntity(entityUid, _
    entityTypeUid, language)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/Admin/ReadDepartmentsByEntity", RequestNamespace = "https://schemas.microsoft.com/office/project/server/webservices/Admin/", 
    ResponseNamespace = "https://schemas.microsoft.com/office/project/server/webservices/Admin/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public DepartmentsDataSet ReadDepartmentsByEntity(
    Guid entityUid,
    Guid entityTypeUid,
    int language
)

Parameters

  • entityUid
    Type: System.Guid
    The GUID of the specified entity.
  • entityTypeUid
    Type: System.Guid
    The GUID of the entity type.
  • language
    Type: System.Int32
    Specifies the primary language identifier that indicates the language of a country or region.

Return Value

Type: [Admin Web service].DepartmentsDataSet
Contains the list of departments for the specified entity.

Remarks

The entity type can be a project, resource, or enterprise project type, or an Optimizer analysis, driver, or prioritization. You can determine the entity type by using the following properties:

The ReadDepartmentsByEntity method should not be called for a resource that does not exist. When you create a resource by using the CreateResources method, the entityUid value is temporary until the CreateResource method finishes. Then get the final RES_UID value by using the ReadResources method.

Project Server Permissions

Permissions are non-standard. Each row in the following table shows the permissions that are required for the specified type of entity.

Permission

Description

OpenProject

Required for a project entity. Category permission.

ViewEnterpriseResourceData

Required for a resource entity. Category permission.

ManagePortfolioAnalyses

Required for an Optimizer analysis entity. Global permission.

ManageDrivers

Required for an Optimizer driver entity. Global permission.

ManagePrioritizations

Required for an Optimizer prioritization entity. Global permission.

ManageWorkflow

NewProject

Both permissions are required for an enterprise project type (EPT) entity. Global permission.

See Also

Reference

Admin Class

Admin Members

Admin Web Service