Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

updateCaseEditFieldsData(caseID, changeSet, eTag, context)

Updated on July 20, 2021

Updates the fields of a case.

Note: To update the fields of a case, you must obtain a lock on the case using the getCaseEditLock(caseID, context) API.

Returns

A Promise that when resolved indicates that the case data is updated successfully.

Parameters

NameTypeDescriptionRequired
caseIDstringThe ID of the case whose fields must be updated.
changeSetobjectThe object containing the data to be updated in the fields.
eTagstringThe response header generated when the lock is acquired on a case successfully.
contextstringThe name of the context where the API is being called.

Usage example

In this example, the API returns an object indicating that the case data has been successfully updated.

const caseID = "METORG-VEHICLEMANAGER-WORK V-7222";
const changeSet = { "METORG-VEHICLEMANAGER-WORK V-7222": { Make: "New Value" } };
const eTag = "20200831T114802.686 GMT";
const context = "app/primary_1";
PCore.getDataApiUtils().updateCaseEditFieldsData(caseID, changeSet, eTag, context);
.then(response => {

 // The response of this API is as shown below:
    {
     "data": {
        "caseInfo": {
          "caseTypeID": "MetOrg-VehicleManager-Work-VehiclePurchase",
          "owner": "reactuser",
          "availableActions": [],
          "lastUpdatedBy": "mohaa5",
          "assignments": [],
          "sla": {},
          "createdBy": "reactuser",
          "createTime": "2020-06-08T12:10:08.813Z",
          "urgency": "10",
          "name": "Vehicle Purchase",
          "stages": [],
          "ID": "METORG-VEHICLEMANAGER-WORK V-10001",
          "lastUpdateTime": "2020-09-01T05:52:54.225Z",
          "stageID": "PRIM5",
          "stageLabel": "Request",
          "status": "New"
        }
      },
      "confirmationNote": "Thank you! The next step in this case has been routed appropriately."
    }
  })
  .catch(error => {
    console.log(error);
  });

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us