You can do this by creating a custom action or by script action in Add Case details page.
Better way to avoid duplicate cases by any means is through change preprocessors. You can throw an error message in RuntimeException there.
Regards,
Ramesh Bhat
------------------------------
Ramesh Bhat
------------------------------
Original Message:
Sent: Thu August 25, 2022 06:57 AM
From: Sameera Wijayarathne
Subject: How to read caselist item count from a script adapter for field update.
IBM case manager 5.3.3
I want to prevent users from creating duplicate cases with the same properties.
I loaded old cases to a case list once the properties were updated.
now I want to prevent saving the case if the caselist widget has items.
Following code works fine on script action buttons.
if (paged._widgets[2].ecmContentList.getResultSet().items.length > 0) {
alert("Duplicate case");
}
TIA.
------------------------------
Sameera Wijayarathne
Sri Lanka
------------------------------