Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(function executeRule(current, previous /*null when async*/ ) {
/*
Fire this BR when a tag is removed/deleted from a record.
Retrieve the tag name, the user who removed the tag, and the tag removal date.
Update the above information onto the tag-referenced record in this example, In this example its incident record
*/
var updateRecord = new GlideRecord(current.table);
if (updateRecord.get(current.table_key)) {
var notes = "Tag Name:" + " " + current.label.getDisplayValue() + "\n" + "Tag Removed By:" + " " + current.sys_updated_by + "\n" + "Tag Removed On:" + " " + current.sys_updated_on;
//updateRecord.setValue("work_notes", notes);
updateRecord.work_notes = notes;
updateRecord.update();
}
})(current, previous);
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**Configure the following business rule on the label_entry table:**

1.Ensure the "Delete" operation is selected and the rule runs onBefore.

2.Retrieve the table name where the tag is removed.

3.Update the worknotes to track who removed the tag and when it was removed.
<img width="952" height="460" alt="image" src="https://github.com/user-attachments/assets/020525dc-c98d-4ae8-94f9-d77cca6680e7" />
<img width="1665" height="739" alt="image" src="https://github.com/user-attachments/assets/46c930eb-c031-4e1e-b1e6-31a3c64debb0" />


**Output:**

<img width="1139" height="818" alt="image" src="https://github.com/user-attachments/assets/ed07f380-f279-4eca-82a5-208ae54054e7" />

<img width="780" height="401" alt="image" src="https://github.com/user-attachments/assets/283b40e1-1d7c-42aa-85f8-b8e9c6ccc3d0" />

Loading