Skip to content

Commit e881f78

Browse files
authored
Abort action, when description is empty and state is compeleted (#2593)
* Create ReadMe.md * Create Code.js * Update Code.js * Update Code.js * Update ReadMe.md
1 parent 5b4f8b5 commit e881f78

File tree

2 files changed

+14
-0
lines changed
  • Client-Side Components/Client Scripts/Abort action when description is empty

2 files changed

+14
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function onSubmit() {
2+
//Type appropriate comment here, and begin script below
3+
var description = g_form.getValue('description');
4+
var state = g_form.getValue('state');
5+
6+
if ((!description) && (state == 'completed')) {
7+
g_form.addErrorMessage('Please provide Description Value, Description Cannot be empty');
8+
9+
return false;
10+
}
11+
12+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
When an Incident record is being closed, the system should validate that the Description field is not empty and state is completed.
2+
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.

0 commit comments

Comments
 (0)