addRelatedCases(caseID, relatedCases, context)
Relates several cases to a specific case.
Returns
A Promise.
Parameters
Name | Type | Description | Required |
caseID | string | The ID of the case to which several cases can be related. | ✅ |
relatedCases | array | The list of case IDs that must be related to a case. | ✅ |
context | string | The name of the context where the API is being called. | ✅ |
Usage example
In this example, the API relates two cases whose IDs are T-200
and
T-201
to the case whose ID is W-102
.
PCore.getRelatedCasesApi().addRelatedCases('W-102', [{ ID : 'T-200'}, {ID : 'T-201'}], 'app/primary_1')
.then(() => {
// success
}).catch(err => {
// Error handling
});
Previous topic APIs in the RelatedCasesApi module Next topic getRelatedCases(caseID, context)