Commit 796cbdb
authored
Create beforeBusinessRule.js
(function executeRule(current, previous /*null when async*/) {
var detector = new DuplicateCIDetector();
var duplicates = detector.findDuplicates(
current.name,
current.serial_number,
current.asset_tag,
current.sys_id
);
if (duplicates.length > 0) {
var message = '1 parent 350b97a commit 796cbdb
File tree
1 file changed
+19
-0
lines changed- Server-Side Components/Business Rules/Duplicate CI Detection for ServiceNow
1 file changed
+19
-0
lines changedLines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments