you would have to create a library wrapping the me...
# suitescript
j
you would have to create a library wrapping the message module. Inside your module you could maintain a map of ids to message references.
Copy code
var messages = {};

function addNotification(messageId, ...) {
  var msg = message.create(...);
  messages[messageId] = msg;
}

function clearNotification(messageId) {
  var msg = messages[messageId];
  if (msg) {
    msg.hide();
  }
}