We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2528aca commit 6ee6effCopy full SHA for 6ee6eff
1 file changed
Server-Side Components/Business Rules/Prevent Creation of Recursive BR/script.js
@@ -0,0 +1,12 @@
1
+(function executeRule(current, previous /*null when async*/) {
2
+ // Check if the script contains 'current.update()'
3
+ if (current.script && current.script.toLowerCase().includes('current.update()')) {
4
+ var errMsg = "Error: 'current.update()' should not be used in Business Rules.";
5
+
6
+ // Abort the insert/update operation
7
+ gs.addErrorMessage(errMsg);
8
+ current.setAbortAction(true);
9
+ }
10
11
12
+})(current, previous);
0 commit comments