Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**This feature will be used in the instance of Zurich++ release**

Demonstrate different messages that has been introduced as part of Zurich release.

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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
function onLoad() {
var state = g_form.getValue('state'); //Get value of 'state' field

if (state != '6' && state != '7' && state != '8') {
var priority = g_form.getValue('priority'); // Get value of 'priority' field
switch (priority) {
case '1':
g_form.addErrorMessage('Critical Incident');
break;
case '2':
g_form.addHighMessage('High Priority Incident'); // addHighMessage() method will display message in orange color
break;
case '3':
g_form.addModerateMessage('Medium Priority Incident'); // addModerateMessage() method will display message in purple color
break;
case '4':
g_form.addLowMessage('Low Priority Incident'); // addLowMessage() method will display message in grey color
break;
}
} else if (state == '6' || state == '7') {
g_form.addSuccessMessage('Incident closed'); // addSuccessMessage() method will display message in green color
}
}
Loading