Skip to content

Commit

Permalink
Update UpdateRelatedRecords
Browse files Browse the repository at this point in the history
Removed $ as it applies to only integer
  • Loading branch information
dvn-lazywinner authored Oct 30, 2024
1 parent 7d432e4 commit a787373
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions GlideRecord/UpdateRelatedRecords
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Retrieve related records from another table and process them
let parentGR = new GlideRecord('$parent_table');
parentGR.addEncodedQuery('$query');
let parentGR = new GlideRecord('parent_table');
parentGR.addEncodedQuery('query');
parentGR.query();

while (parentGR.next?.()) {
let taskGR = new GlideRecord('$child_table');
let taskGR = new GlideRecord('child_table');
taskGR.addQuery('parent', parentGR.sys_id);
taskGR.query();

while (taskGR.next?.()) {
taskGR.state = '$value';
taskGR.state = 'value';
taskGR.update?.();
}
}

0 comments on commit a787373

Please sign in to comment.