Info Message not populated on the form

Saranya2
Tera Contributor

Hi All,

I have created After Insert/Update BR, In that I have used gs.addInfoMessage(" "), but the info message is not getting populating. 

BR:

(function executeRule(current, previous /*null when async*/) {

var uniqueOutageSysIDs;
if (getTableExtensions('cmdb_ci_server').indexOf(current.cmdb_ci.sys_class_name) != -1) 
{

    uniqueOutageSysIDs = new AffectedCI().ServerCI(current);
}
 else if (current.cmdb_ci.sys_class_name == 'cmdb_ci_business_app')
 {
    uniqueOutageSysIDs = new PopulateAffectedCI().BusinessAppCI(current);
 }
 else if (getTableExtensions('cmdb_ci_netgear').indexOf(current.cmdb_ci.sys_class_name) != -1) 

{     

uniqueOutageSysIDs = new PopulateAffectedCI().NetworkCI(current);
 }

gs.addInfoMessage("Affected Cis are attached ");
})(current, previous);

10 REPLIES 10

No.

Probably the transaction is "multiplied" by scripts calling current.update() or forcing otherwise null updates (updates that did not result in changes) to count as updates that did result in changes.

Or it may be that there are multiple Business Rules adding the same message.

The only way to tell really, is to start the business rule debugger and look for how many times (and why) the Business Rule adding the message is executed.

Probably this is an old problem and that is why

gs.flushMessages();

has been added in the 1st place.