Info Message not populated on the form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 08:00 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 09:04 AM
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.