Skip to content

Commit 557f3ba

Browse files
authored
Create README.md
1 parent 5ae2a56 commit 557f3ba

File tree

1 file changed

+9
-0
lines changed
  • Server-Side Components/Background Scripts/Update Field Based on Another Table’s 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+
Update incidents with the department of their caller
2+
Loops through every user in the sys_user table. For each user, finds all incidents where they are the caller (caller_id matches sys_id of the user).
3+
For each matching incident:
4+
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)