Skip to content

Commit 2dd9b6c

Browse files
authored
Create README.md
1 parent 072e481 commit 2dd9b6c

File tree

1 file changed

+23
-0
lines changed
  • Server-Side Components/Background Scripts/Copy Field Values and Insert in Target Record

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
Script Usage :
3+
4+
The function tables the parameters such as source table, source record sys_id, target table, fields that needs to be copied to target table.
5+
6+
As a validation check, the fields from source table should be similar to target else abort inserting the record.
7+
8+
9+
Same Code to invoke the function:
10+
copyFieldsValidated(
11+
'dmn_demand',
12+
'8c10306edbc00810f777526adc961976',
13+
'pm_project',
14+
['name', 'short_description'] //will throw error since name field not common in both tables
15+
);
16+
17+
18+
copyFieldsValidated(
19+
'dmn_demand',
20+
'8c10306edbc00810f777526adc961976',
21+
'pm_project',
22+
['short_description'] //Insert the record since short_description is common in both tables
23+
);

0 commit comments

Comments
 (0)