Share this page

# clearStaffingProfileForecastAndAssignmet

## Purpose

The operation is used to clear the future forecast and assignment for a completed staffing profile.

## Function

This operation clears the forecast and assignment from a specified date for a completed staffing profile. The operation cannot be undone.

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

- Have the edit staffing profile access grant

- In the staffing profile ACL list

## Limitations

- The staffing profile must be in the "completed" status.

- The date from which to clear forecast and assignment must be later than the staffing profile's start date.

## Input

A ClearSPForecastAndAssignmentDocument object that contains the header and the parameters to clear forecast and assignment.

## Return

A ClearSPForecastAndAssignmentResponseDocument object that contains the header, a response message and a budget ID.

## Java Interface

`public com.mercury.itg.ws.rm.client.ClearSPForecastAndAssignmentResponseDocument clearStaffingProfileForecastAndAssignment( com.mercury.itg.ws.rm.client.ClearSPForecastAndAssignmentDocument param30)`

Parameters | Description
--- | ---
ClearSPForecastAndAssignmentDocument | Wrapper of Staffing Profile's ID and the 'clear from date'
ClearSPForecastAndAssignmentResponseDocument | Contains nothing.

## Java Examples

Example: clears the forecast and assignment from a specified date for a staffing profile

    private void clearStaffingProfileForecastAndAssignment(String
    serviceURL, long staffingProfileId, java.util.Date
    clearFromDate) throws Exception{

        StaffingProfileServiceStub stub = new
    StaffingProfileServiceStub(ctx, serviceURL);
        ClearStaffingProfileForecastAndAssignmentDocument inDoc =
    ClearStaffingProfileForecastAndAssignmentDocument.Factory.newIn
    stance();

    ClearStaffingProfileForecastAndAssignmentDocument.ClearStaffing
    ProfileForecastAnd Assignment clearSP =
    inDoc.addNewClearStaffingProfileForecastAndAssignment();
        clearSP.setStaffingProfileId(id);
        clearSP.setClearFromDate(clearFromDate);

## Errors and Exceptions

Possible root cause descriptions:

Message Code | Message | Cause(s) | Possible Corrective Action
--- | --- | --- | ---
exception.spStatusMustBeCompleted | Staffing profile status must be 'completed'. | The staffing profile specified is not in 'completed' status | Change the staffing profile's status to 'completed' before call this function.
exception.clearFromDateMustBeAfterSPStart | The clear from date must be after the staffing profile start date. | The clear from date is before the staffing profile's start date. | Change the clear from date to make sure it's after the staffing profile's start date.
rm.ws.exception.notAuthorized | You do not have the privilege to take this action. Please consult your PPM Administrator. | The user has no access granted to clear the forecast and assignment. | Grant the 'edit positions' access authority to the user and change a user who has the access.

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: