File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Server-Side Components/Business Rules/Track Tag Removal Using Delete Business Rule Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1+ ( function executeRule ( current , previous /*null when async*/ ) {
2+ /*
3+ Fire this BR when a tag is removed/deleted from a record.
4+ Retrieve the tag name, the user who removed the tag, and the tag removal date.
5+ Update the above information onto the tag-referenced record in this example, In this example its incident record
6+ */
7+ var updateRecord = new GlideRecord ( current . table ) ;
8+ if ( updateRecord . get ( current . table_key ) ) {
9+ var notes = "Tag Name:" + " " + current . label . getDisplayValue ( ) + "\n" + "Tag Removed By:" + " " + current . sys_updated_by + "\n" + "Tag Removed On:" + " " + current . sys_updated_on ;
10+ //updateRecord.setValue("work_notes", notes);
11+ updateRecord . work_notes = notes ;
12+ updateRecord . update ( ) ;
13+ }
14+ } ) ( current , previous ) ;
You can’t perform that action at this time.
0 commit comments