updateCaseEditFieldsData(caseID, changeSet, eTag, context)
Updates the fields of a case.
Returns
A Promise that when resolved indicates that the case data is updated successfully.
Parameters
Name | Type | Description | Required |
caseID | string | The ID of the case whose fields must be updated. | ✅ |
changeSet | object | The object containing the data to be updated in the fields. | ✅ |
eTag | string | The response header generated when the lock is acquired on a case successfully. | ✅ |
context | string | The 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);
});
Previous topic getListCount(dataViewName, payload, context) Next topic APIs in the EnvironmentInfo class