Skip to content

GetWorkItems

Gets an array of work items that were started on this case.

1
myCase.GetWorkItems():Array<WorkItem>

Returns

The work items started on this case.

Examples

Check whether a work item started from the case is still open

1
2
3
4
5
6
7
var open = $Case.GetWorkItems().filter(function (workItem) {
    return workItem.State === 'Waiting';
});

if (open.length > 0) {
    throw new Error('The case has open tasks.');
}

See Also