setRequestFields

Purpose

This operation updates one or more simple fields in a request in PPM.

Function

This operation updates the content of a request, identified by the request ID in PPM. You can update the following fields of a request through this operation:

  • Simple Field from request header type

  • Simple Field from request type

  • Simple Field from Field Group

Exception: The following field is not updatable once the request is created. Therefore, you cannot update them using this operation:

  • REQ.CREATED_BY_NAME

  • REQ.CREATED_BY_USERNAME

  • REQ.CREATED_BY_EMAIL

  • REQ.CREATION_DATE

  • REQ.CREATED_BY

  • REQ.LAST_UPDATED_BY_USERNAME

  • REQ.LAST_UPDATED_BY_EMAIL

  • REQ.LAST_UPDATE_DATE

  • REQ.LAST_UPDATED_BY

  • REQ.REQUEST_TYPE_NAME

  • REQ.REQUEST_TYPE_ID

  • REQ.REQUEST_ID

  • REQ.WORKFLOW_NAME

  • REQ.WORKFLOW_ID

  • REQ.STATUS_NAME

  • REQ.STATUS_ID

  • REQ.CONTACT_PHONE_NUMBER

  • REQ.CONTACT_EMAIL

  • REQD.CREATION_DATE

  • REQD.LAST_UPDATE_DATE

  • REQD.WORKFLOW_ID

  • REQD.CREATED_BY

  • REQD.REQUEST_ID

  • REQD.LAST_UPDATED_BY

  • SYS.USERNAME

  • SYS.USER_ID

During this operation, the rules defined on the fields are applied, in the order of the fields' appearance in the Web service request. Any field in which you enter a value will override the rule-derived value.

To update field with type of budget, benefit, or staffing profile, the name of the entity is the field value.

Limitations

This operation has the following limitations:

  • Does not support updates of fields with attachments, password fields, and table component fields. Table component fields can be set only when you create a request. Once the request has been created, the Web service interface does not support update of table component fields.

  • No additional security check including participant or field level access check on this operation. After the request passes the Web service authentication, the operation will try the update with no further security check.

Note: For more information, see:

  • addRequestNotes - add new note to existing request

  • setRequestRemoteReferenceStatus - update the status in remote reference

  • executeWFTransitions - execute work flow transition for the request

Related Information

The following data type:

Input

A collection of changed fields, and the ID of the request.

Return

Upon success, the operation returns the ID of the request.

Java Interface

SetRequestFieldsResponseDocument
setRequestFields(SetRequestFieldsDocument in)

Parameters

Description

SetRequestFieldsDocument

Wrapper of the collection of request fields, or SimpleField[].

SetRequestFieldsResponseDocument

Wrapper of the return code of this operation.

Java Examples

Example: update several simple fields of an existing request.

public class ExampleSetRequestFields {
. . .
    private void setRequestFields(String serviceURL, String
requestId) throws Exception {
. . .
       // create the array of changed fields
       SimpleField[] fields = new SimpleField[2]; 
       // Set field 'Description'
       SimpleField field_A = SimpleField.Factory.newInstance();
       field_A.setToken("REQ.DESCRIPTION");
       field_A.setStringValue1Array(new String[] { "WebService
Test (Update)" });
       fields[0] = field_A;
       // Set field 'Department'
       SimpleField field_B = SimpleField.Factory.newInstance();
       field_B.setToken("REQ.DEPARTMENT_NAME");
       field_B.setStringValue1Array(new String[] { "IS" });
       fields[1] = field_B;
       // Get web service
       DemandServiceStub stub = new DemandServiceStub(ctx,
serviceURL);
       // Construct message to send
       SetRequestFieldsDocument inDoc =
SetRequestFieldsDocument.Factory.newInstance();
       SetRequestFieldsDocument.SetRequestFields
setRequestFields = inDoc
                .addNewSetRequestFields();
        setRequestFields.setRequestId(reqId);
        setRequestFields.setFieldsArray(fields);
. . .
}
}

Errors and Exceptions

Message Code

Message

Cause(s)

Possible Corrective Action

KNTA-11186

ry.com/ppm/common/1.0}token"(line -1, col -1, in SOAP-message)

You have not provided the token.

Provide a token name to update.

N/A

An error occurred when updating request fields-java.lang.Exception: Error 2: Error validating value "ISSP" for field REQ.DEPARTMENT_NAME: no valid data was found for drop-down list.Error 2: Error validating value "ISSP" for field REQ.DEPARTMENT_NAME: no valid data was found for drop-down list.

You have provided an invalid value for the token.

Provide a valid token value for update.

N/A

Open API Exception 4: The Request could not be locked because another party currently holds the lock.

Update collision.

Retry the operation.

N/A

An error occurred when updating request fields-java.lang.NumberFormatException: For input string: "30361A

You have provided an invalid request ID.

Provide a valid request ID.

KNTA-11186

y.com/ppm/dm/service/1.0}requestId

You have not provided the request ID.

Provide the request ID.

N/A

Error in loadAndLockRequest Open API Exception 9: Request with ID 30391 was not found in the system. Import was not performed.

The request ID you provided does not exists in the system.

Provide an existing request ID.