Share this page

# getPositionIdsforStaffingProfile

## Purpose

This operation reads position IDs for a staffing profile in PPM Center.

## Function

This operation enables external applications to read position ids for a staffing profile identified by staffing profile ID in PPM Center. The operation returns an array of position IDs.

To perform this operation, the user must meet the following conditions:

- Have the view staffing profile access grant

- In the Staffing profile ACL list

## Input

The staffing profile ID.

## Return

An array of position lines IDs

## Java Interface

`public Long[] getPositionIdsforStaffingProfile (long id)`

Parameters | Description
--- | ---
id | Staffing profile ID

## Java Examples

Example: reads position lines for a staffing profile

    private Long[] getPositionIdsforStaffingProfile(String
    serviceURL, long id) throws Exception{

        Long[] result = null;
        StaffingProfileServiceStub stub = new
    StaffingProfileServiceStub(ctx, serviceURL);
        GetPositionIdsforStaffingProfileDocument inDoc =
    GetPositionIdsforStaffingProfileDocument.Factory.newInstance();

    GetPositionIdsforStaffingProfileDocument.GetPositionIdsforStaff
    ingProfile getPositionIds =
    inDoc.addNewGetPositionIdsforStaffingProfile();
        getPositionIds.setStaffingProfileId(id);

        // Invoke web service
        GetPositionIdsforStaffingProfileResponseDocument outDoc =
    stub.getPositionIdsforStaffingProfile(inDoc);
        result =
    outDoc.getPositionIdsforStaffingProfileResponse().getPositionId
    Array();

        return result;
    }

## Errors and Exceptions

Possible root cause descriptions:

Message Code | Message | Cause(s) | Possible Corrective Action
--- | --- | --- | ---
exception.authorization | You do not have the privilege to take this action. Please consult your PPM Administrator | You do not have the required access grants for this operation | Verify that your account has the required access grants
rm.ws.exception.StaffingProfileNotExist | Staffing profile does not exist | The staffing profile cannot be found by using the staffing profile ID | Verify if the staffing profile ID exists
exception.cannotViewStaffingProfile | User cannot view staffing profile {0} | You do not have the access grants of viewing the staffing profile | Verify that your account has the required access grants

https://admhelp.microfocus.com PPM 8942
Tips to improve your search results... OpenText™ Project and Portfolio Management Help Center PPM Help 26.2-26.3 All View Local Help Center View Online Help Center Version: