From c5c788f2edd5df50f0e2eb3927a7808c71f6ae48 Mon Sep 17 00:00:00 2001 From: MANCHALA YASWANTH <71426465+MYaswanth28@users.noreply.github.com> Date: Sat, 11 Oct 2025 16:11:59 +0530 Subject: [PATCH 1/2] Create prevent_continous_update.js BR Code --- .../prevent_continous_update.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Server-Side Components/Business Rules/Preventing Recursive Updates from Integrations/prevent_continous_update.js diff --git a/Server-Side Components/Business Rules/Preventing Recursive Updates from Integrations/prevent_continous_update.js b/Server-Side Components/Business Rules/Preventing Recursive Updates from Integrations/prevent_continous_update.js new file mode 100644 index 0000000000..590c3c49da --- /dev/null +++ b/Server-Side Components/Business Rules/Preventing Recursive Updates from Integrations/prevent_continous_update.js @@ -0,0 +1,20 @@ +(function executeRule(current, previous) { + + if (current.isNewRecord() || !current.isValidRecord() || current.operation() == 'delete') { + return; + } + var fieldsToCheck = ['work_notes', 'comments', 'state']; + var allFieldsSame = true; + for (var i = 0; i < fieldsToCheck.length; i++) { + var field = fieldsToCheck[i]; + if (current.changes.call(current, field) && current[field].toString() !== previous[field].toString()) { + allFieldsSame = false; + break; + } + } + if (allFieldsSame) { + gs.info('BR skipped redundant integration update for ' + current.sys_class_name + ': ' + current.number); + current.setAbortAction(true); + } + +})(current, previous); From 581a271c86b6ca055c2b660ea46336cba813c008 Mon Sep 17 00:00:00 2001 From: MANCHALA YASWANTH <71426465+MYaswanth28@users.noreply.github.com> Date: Sat, 11 Oct 2025 16:16:25 +0530 Subject: [PATCH 2/2] Create README.md --- .../README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Server-Side Components/Business Rules/Preventing Recursive Updates from Integrations/README.md diff --git a/Server-Side Components/Business Rules/Preventing Recursive Updates from Integrations/README.md b/Server-Side Components/Business Rules/Preventing Recursive Updates from Integrations/README.md new file mode 100644 index 0000000000..f751eb2a9f --- /dev/null +++ b/Server-Side Components/Business Rules/Preventing Recursive Updates from Integrations/README.md @@ -0,0 +1,15 @@ +**Business Rule** + +Table : Any Custom Table or (Incident,Problem , Change)... +Active : true +When : before +Update : true +order : 100 + +condition : gs.getUser().getUserName() == 'integration.user/Web services User' + +The rule must only run when the update is coming from the dedicated integration user to avoid impacting manual user updates, Can Update Fields to check as Required + +This business rule is designed to prevent unnecessary and redundant updates to records that are synchronized with external systems (e.g., Jira, Azure DevOps, or a custom application) via integration / E bonding + +This rule executes a check to ensure that the fields critical to the integration (Work Notes, Comments, State) have genuinely changed before allowing the update to process.