Skip to content

Commit 934233f

Browse files
authored
script.js
1 parent 599f55e commit 934233f

File tree

1 file changed

+10
-0
lines changed
  • Client-Side Components/Client Scripts/Require comment onPriority change

1 file changed

+10
-0
lines changed
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)