Skip to content

Commit 034d52d

Browse files
authored
Create README.md
1 parent 8fee2ed commit 034d52d

File tree

1 file changed

+9
-0
lines changed
  • Server-Side Components/Background Scripts/Update Field Based on Another Table Data

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This script Update incidents with the department of their caller
2+
Loops through every user in the sys_user table.
3+
For each user, finds all incidents where they are the caller (caller_id matches sys_id of the user).
4+
For each matching incident: Copies the user's department value, Sets it on the incident's custom field u_department.
5+
6+
Use Case Example:
7+
8+
Let’s say you want each incident record to store the caller’s department, but this info is only on the user profile.
9+
This script pulls it from the user and updates all related incident records.

0 commit comments

Comments
 (0)