I would like to add a field from the vulnerability table (CISA Due Date) to the Vulnerable Table

JamesNicol_1
Tera Contributor

I would like to add add a field from the vulnerability table in vulnerability response application to the vulnerable Item table using business rules.

 

The vulnerability table is sn_vul_entry and the field name is due_date

 

I have created a new field in the vulnerable item table (sn_vul_vulnerable_item) called u_cisa_due_date.

1 ACCEPTED SOLUTION

Bhuvan
Kilo Patron

@JamesNicol_1 

 

Create Business Rule as below on 'sn_vul_entry' table. When 'due_date' field is created or updated on the 'Vulnerability Entry' table it will update field 'u_cisa_due_date' field in 'Vulnerable Item' table.

 

Bhuvan_0-1756015934872.png

 

Bhuvan_2-1756016130910.png

(function executeRule(current, previous /*null when async*/) {
// Add your code here
var vulItems = new GlideRecord('sn_vul_vulnerable_item');
vulItems.addQuery('vulnerability', current.id );
vulItems.query();	
while ( vulItems.next() ) 
{
vulItems.setValue('u_cisa_due_date',current.due_date);
vulItems.update();
}
})(current, previous);

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

View solution in original post

6 REPLIES 6

Bhuvan
Kilo Patron

@JamesNicol_1 

 

Create Business Rule as below on 'sn_vul_entry' table. When 'due_date' field is created or updated on the 'Vulnerability Entry' table it will update field 'u_cisa_due_date' field in 'Vulnerable Item' table.

 

Bhuvan_0-1756015934872.png

 

Bhuvan_2-1756016130910.png

(function executeRule(current, previous /*null when async*/) {
// Add your code here
var vulItems = new GlideRecord('sn_vul_vulnerable_item');
vulItems.addQuery('vulnerability', current.id );
vulItems.query();	
while ( vulItems.next() ) 
{
vulItems.setValue('u_cisa_due_date',current.due_date);
vulItems.update();
}
})(current, previous);

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

@JamesNicol_1 

 

Did you get a chance to review this ?

 

If my response helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan