IBM Support

ICM Data Validation When Adding New Cases

Technical Blog Post


ICM Data Validation When Adding New Cases


In a previous blog entry I showed how to use ICM 5.2's new coordination mechanism to hook in custom logic when saving and closing any of the transient pages such as step complete.

In this entry, I have modified the example to show how to do the same thing on the Add Case page.

  • Add a Script Adapter to your Add Case page and hide it
  • Wire the incoming event for the Script Adapter from the Page Container's Send New Case Information event

var coord = payload.coordination;
var caseEdit = payload.caseEditable;
var solution = this.solution;
var prefix = solution.getPrefix();

require(["icm/base/Constants", "icm/model/properties/controller/ControllerManager"], function(Constants, ControllerManager){


/*Participate in the VALIDATE coordination step*/

coord.participate(Constants.CoordTopic.VALIDATE, function(context, complete, abort){


   /*Check work item property attribute's value*/

   var propId = prefix + '_Description';

   /*Retrieve prop value(s) using property controller API*/

   var theController = ControllerManager.bind(caseEdit);
   var propController = theController.getPropertyController(propId);
   var value = propController.get("value");

   /*Unbind is necessary to prevent mem leak.*/


   if(value === null || value === undefined || value === ""){

      /*Abort the page completion with passing a message to user*/

      abort({"message":"Please enter a description before adding the case."});

For more information on the coordination mechanism, search for coordination in the ICM Javascript API InfoCenter chapters.


[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSCTJ4","label":"Case Manager"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]