iParagons

IBM FileNet P8 | Case Manager | Content Navigator

How to get icm.model.Case.caseidentifier from a Script Adaptor

IBM Case Manager Client

How to get icm.model.Case.caseidentifier from a Script Adaptor

By Junaid Azam / Jul 9, 2018

In many cases when you have some certain requirement in Case Work Details page with requirement to forward/assign the "icm.model.Case.caseIdentifier from a script adaptor" property value from a widget to another website widget or external webpage.
  • First of all add website widget, rename it to some different on Case Work Details Page and wire its incoming event like;
caseidentifier from a script adaptor wiring

Solution to get caseidentifier from a script adaptor:

  • Add hidden script adaptor on Case Work Details Page and add the following code (Modify as per your requirements):

console.log("DEBUG-SampleScriptAdapter-ENTRY"); var thisobj = this; payload.workItemEditable.icmWorkItem.caseObject.retrieveCachedAttributes( function(caseObject) { console.log("DEBUG-retrieveCachedAttributes-ENTRY"); var caseID = caseObject.caseIdentifier; console.log("caseID: "+caseID); var url = "http://icmserver.ibm.com/upload/upload.php?CASEID="+caseID; console.log(url); thisobj.onBroadcastEvent("icm.DisplayUrl", url); return url; console.log("DEBUG-retrieveCachedAttributes-EXIT"); }); console.log("DEBUG-SampleScriptAdapter-EXIT"); // return payload;

  • Wire its incoming and outgoing wiring as described below:
caseidentifier from a script adaptor Once these changes made, caseidentifier will be pass/assigned to website widget and results will be displayed on that website widget. e.g. caseIdentifier from a script adaptor Note: this code is for both ICM 5.2.x and ICM 5.3.x. Complete details is mentioned on this tech note about case identifier https://www.ibm.com/docs/SSCTJ4_5.3.0/com.ibm.casemgmt.development.doc/acmdv119.htm

2 Comments

  1. lieselotte September 27, 2018 at 8:06 PM
    the same idea i've implemented using this code on case details page when user clicks on caseid from case information widget. Thanks for sharing.
  2. Tanaya September 27, 2018 at 8:43 PM
    Thanks for one's marvelous post. I genuinely
    achieved the same in my ICM 5.2 environment successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *