- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
(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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
(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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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