IBM Case Manager (ICM), IBM Case Manager Client

How to get icm.model.Case.caseIdentifier from a script adapter

July 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” 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;

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

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Ā  for both ICM5.2.x and ICM5.3.x.

You Might Also Like

2 Comments

  • Reply lieselotte September 28, 2018 at 1:06 am

    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.

  • Reply Tanaya September 28, 2018 at 1:43 am

    Thanks for one’s marvelous post. I genuinely
    achieved the same in my ICM 5.2 environment successfully.

  • Leave a Reply

    error

    Subscribe