Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

Jay_N
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
Giga Patron

@Jay_N 

 

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
Giga Patron

@Jay_N 

 

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

@Jay_N 

 

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