Skip to content

Commit 776ae3b

Browse files
authored
Use different information messages that has been introduced as part of Zurich release (#1963)
* Zurich - Updated info messages Display different information messages that is released as part of Zurich release. * ReadMe file Description about use case
1 parent e09ec29 commit 776ae3b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
**This feature will be used in the instance of Zurich++ release**
2+
3+
Demonstrate different messages that has been introduced as part of Zurich release.
4+
5+
Use Case: Display different information messages based on priority of the incident that will be showed on load and state is not Closed, Resolved or Cancelled.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
function onLoad() {
2+
var state = g_form.getValue('state'); //Get value of 'state' field
3+
4+
if (state != '6' && state != '7' && state != '8') {
5+
var priority = g_form.getValue('priority'); // Get value of 'priority' field
6+
switch (priority) {
7+
case '1':
8+
g_form.addErrorMessage('Critical Incident');
9+
break;
10+
case '2':
11+
g_form.addHighMessage('High Priority Incident'); // addHighMessage() method will display message in orange color
12+
break;
13+
case '3':
14+
g_form.addModerateMessage('Medium Priority Incident'); // addModerateMessage() method will display message in purple color
15+
break;
16+
case '4':
17+
g_form.addLowMessage('Low Priority Incident'); // addLowMessage() method will display message in grey color
18+
break;
19+
}
20+
} else if (state == '6' || state == '7') {
21+
g_form.addSuccessMessage('Incident closed'); // addSuccessMessage() method will display message in green color
22+
}
23+
}

0 commit comments

Comments
 (0)