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..763e34d973 --- /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 state = g_form.getValue('state'); + + if ((!description) && (state == '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..62906c16fe --- /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 and state is completed. +If the Description field is blank and state is completed, the record submission (update) should be aborted, and the user should be prompted to provide a description before closing the incident.