BR to display alert on case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 05:56 PM
Can some please help me write a BR so that an alert (pop up message) is displayed when ever an update is made to a case from a specific contact, I hav tried the following but it's not working?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 08:14 PM
@Jason116 alert is a client side script function and a business rule is a server side script. You will not be able to call a client side method from server side. Instead you need to use gs.addInfoMessage() or gs.addErrorMessage() to show message to the user.
Here is the updated script.
(function executeRule(current, previous /*null when async*/) {
// Check if the contact is Test
if (current.contact == 'Test') {
// Display pop-up message
var alertMessage = 'A new update has been made to the case.';
gs.addInfoMessage(alertMessage);
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 09:09 PM
Thanks, i need this to display as an alert though i.e. i need a window to pop up with the message and the user to click 'ok ' to acknowledge it, how can i do this? if this needs to be another script i.e client script how would this look?