Skip to content

Commit f2fa2d6

Browse files
authored
Require comment on priority change (#2212)
* script.js * README.md
1 parent 57782ff commit f2fa2d6

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Table: sn_customerservice_case
2+
Type: OnChange
3+
Field: Priority
4+
5+
Use Case:
6+
Make additional comments mandatory on priority change for the case table.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
2+
if (isLoading || newValue === '') {
3+
return;
4+
}
5+
if ((!g_form.isNewRecord()) && (newValue != oldValue)) {
6+
g_form.setMandatory('comments', true);
7+
g_form.addErrorMessage('Additional comment required when changing Priority.');
8+
} else {
9+
g_form.setMandatory('comments', false);
10+
}

0 commit comments

Comments
 (0)