I need alert opened date should be populate on detection time filed in the incident

ashok17
Tera Contributor

I need alert opened date should be populate on detection time filed in the incident, Please suggest how to achieve this requirement and i have tried below After Business Rule on incident table but not works:

 

if (!current.u_detection_time && current.u_alert) {
var alertRec = new GlideRecord('u_alert');
if (alertRec.get(current.u_alert)) {
current.u_detection_time = alertRec.u_opened_at;
}
}

22 REPLIES 22

ashok17
Tera Contributor

Hi @Rakesh_M ,

 

My requirement was whenever incident have alert then the alert open date should be populated in detection time, please see below screenshot for reference.

ashok17_0-1777545804726.png

 

HI @ashok17 ,

I want to confirm a few points before proceeding:

  1. Should this update apply to existing records or only new ones?
  2. What is the flow — is the Incident created first and then Alert, or Alert first and then Incident?

ashok17
Tera Contributor

Hi @Rakesh_M ,

 

I am creating first incident then created alert for that incident this is the flow.

Hi @ashok17 ,
as mentioned earlier change the table name to alert and test again.
table:Alert
Condition : opened at is not empty

Rakesh_M_0-1777547178463.png

 

ashok17
Tera Contributor

Hi @Rakesh_M ,

 

I can't see opened at field on condition for the Business Rule, please refer below screenshot.

 

ashok17_0-1777552713519.png