Skip to content

Commit d0d9106

Browse files
authored
Create Change Priority field color when it is critical on Incident form.
1 parent 05572b9 commit d0d9106

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
function onLoad() {
2+
// the value of priority
3+
var priority = g_form.getValue('priority');
4+
5+
if (priority == '1') { // for critical
6+
// Highlight the Priority field in red
7+
g_form.setFieldStyle('priority', 'background-color', 'red');
8+
g_form.setFieldStyle('priority', 'color', 'white'); // Optional: change text color for visibility
9+
} else {
10+
// Reset to default if not high priority
11+
g_form.setFieldStyle('priority', 'background-color', '');
12+
g_form.setFieldStyle('priority', 'color', '');
13+
}
14+
}

0 commit comments

Comments
 (0)