getCaseEditMetadata(caseID, context)
Obtains the edit metadata of a case.
Returns
A promise that when resolved returns the edit metadata of a case.
Parameters
Name | Type | Description | Required |
caseID | string | The ID of the case on which the edit is being performed. | ✅ |
context | string | The name of the context where the API is being called. | ✅ |
Usage example
In this example, the API returns the edit metadata of the case.
const caseID = "METORG-VEHICLEMANAGER-WORK V-7222";
const context = "app/primary_1";
PCore.getDataApiUtils().getCaseEditMetadata(caseID, context)
.then(response => {
// The response of this API is as shown below:
{
uiResources: {},
data: {
caseInfo: {
"caseTypeID": "MetOrg-VehicleManager-Work-VehiclePurchase",
"owner": "[email protected]",
"availableActions": [],
"lastUpdatedBy": "[email protected]",
"sla": {},
"content": {
"classID": "MetOrg-VehicleManager-Work-VehiclePurchase",
"VehicleUsage": "",
"Year": "2013",
"VehicleType": "e7faf92e-e6b0-4793-b59f-e406a2abdb75",
"NeededBy": "20200605T181445.999 GMT",
"Model": "458 Italia",
"Make": "Ferrari",
"RequestingDepartment": "52724c8d-54b9-4819-851d-3765098adebb"
},
"createdBy": "[email protected]",
"createTime": "2020-05-28T20:05:41.235Z",
"urgency": "10",
"name": "2013 Ferrari 458 ITALIA",
"stages": [],
"ID": "METORG-VEHICLEMANAGER-WORK V-7222",
"lastUpdateTime": "2020-05-28T20:05:41.541Z",
"stageID": "PRIM3",
"stageLabel": "Delivery",
"status": "New"
}
}
}
})
.catch(error => {
console.log(error)
});
Previous topic getCaseEditLock(caseID, context) Next topic getData(dataViewName, payload, context, options)