From b802651c8d8eae91215794ea0cce5ab7b18ce874 Mon Sep 17 00:00:00 2001 From: chaytarak <62869669+chaytarak@users.noreply.github.com> Date: Tue, 28 Oct 2025 20:44:04 +0530 Subject: [PATCH 1/2] Create ReadMe.md --- .../Abort action when description is empty/ReadMe.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Client-Side Components/Client Scripts/Abort action when description is empty/ReadMe.md diff --git a/Client-Side Components/Client Scripts/Abort action when description is empty/ReadMe.md b/Client-Side Components/Client Scripts/Abort action when description is empty/ReadMe.md new file mode 100644 index 0000000000..c7acffd1e0 --- /dev/null +++ b/Client-Side Components/Client Scripts/Abort action when description is empty/ReadMe.md @@ -0,0 +1,2 @@ +When an Incident record is being closed, the system should validate that the Description field is not empty. +If the Description field is blank, the record submission (update) should be aborted, and the user should be prompted to provide a description before closing the incident. From ebce0797f4a5cb45c053cb544f69f9bf00a4a00e Mon Sep 17 00:00:00 2001 From: chaytarak <62869669+chaytarak@users.noreply.github.com> Date: Tue, 28 Oct 2025 20:44:48 +0530 Subject: [PATCH 2/2] Create Code.js --- .../Abort action when description is empty/Code.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Client-Side Components/Client Scripts/Abort action when description is empty/Code.js diff --git a/Client-Side Components/Client Scripts/Abort action when description is empty/Code.js b/Client-Side Components/Client Scripts/Abort action when description is empty/Code.js new file mode 100644 index 0000000000..afdc44de2f --- /dev/null +++ b/Client-Side Components/Client Scripts/Abort action when description is empty/Code.js @@ -0,0 +1,12 @@ +function onSubmit() { + //Type appropriate comment here, and begin script below + var description = g_form.getValue('description'); + var status = g_form.getValue('status'); + + if ((!description) || (status == 'completed')) { + g_form.addErrorMessage('Please provide Description Value, Description Cannot be empty'); + + return false; + } + +}