From af9f9c45d7a7202cb305928e4b920be010fcdc0c Mon Sep 17 00:00:00 2001 From: srikanthroyal932-cmyk Date: Sat, 25 Oct 2025 13:01:11 +0530 Subject: [PATCH 1/2] incidentDeleteUtils.js --- .../Delete Swipe Function/incidentDeleteUtils.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Server-Side Components/Script Includes/Delete Swipe Function/incidentDeleteUtils.js diff --git a/Server-Side Components/Script Includes/Delete Swipe Function/incidentDeleteUtils.js b/Server-Side Components/Script Includes/Delete Swipe Function/incidentDeleteUtils.js new file mode 100644 index 0000000000..8f2c67e097 --- /dev/null +++ b/Server-Side Components/Script Includes/Delete Swipe Function/incidentDeleteUtils.js @@ -0,0 +1,15 @@ +var IncidentDeleteUtils = Class.create(); +IncidentDeleteUtils.prototype = { + initialize: function() {}, + + deleteIncident: function(sys_id){ + var gr = new GlideRecord('incident'); + if(gr.get(sys_id)){ + gr.deleteRecord(); + return "Incident Deleted Successfully"; + } + return "Incident Not Found"; + }, + + type: 'IncidentDeleteUtils' +}; From 354854dad11c535ec7d34890f5db9375f0fff99d Mon Sep 17 00:00:00 2001 From: srikanthroyal932-cmyk Date: Sat, 25 Oct 2025 13:09:58 +0530 Subject: [PATCH 2/2] README.md --- .../Script Includes/Delete Swipe Function/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Server-Side Components/Script Includes/Delete Swipe Function/README.md diff --git a/Server-Side Components/Script Includes/Delete Swipe Function/README.md b/Server-Side Components/Script Includes/Delete Swipe Function/README.md new file mode 100644 index 0000000000..33e8dfc384 --- /dev/null +++ b/Server-Side Components/Script Includes/Delete Swipe Function/README.md @@ -0,0 +1,12 @@ +Delete Swipe Function + +1. This Delete Swipe Function was present in Now Mobile - Mobile App Builder (MAB) +2. Create a Script Include name as incidentDeleteUtils +3. Make Accessible from - All application scopes +4. Create a deleteIncident function +5. Pass the sys_id as a input parameter +6. Glide Incident table for checking the record +7. Use if logic for cecking the record is present or not with provided sys_id +8. If found delete the Incident record then return as "Incident Deleted Successfully" +9. If not fount return as "Incident Not Found" +10. This functionality will work in the Now Mobile App & Mobile App Builder (MAB).