BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
Expand all | Collapse all

How to read caselist item count from a script adapter for field update.

  • 1.  How to read caselist item count from a script adapter for field update.

    Posted Thu August 25, 2022 11:23 AM

    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
    ------------------------------


  • 2.  RE: How to read caselist item count from a script adapter for field update.

    Posted Wed September 14, 2022 02:53 PM
    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
    ------------------------------