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; + } + +} 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.