Case creation alert not being sent to specific Resource
Summary:
In case management I only want the Case Managers to be notified when a new case is created. I wrote a script to specifically send a notification to a specific Case manager by using their Party ID in app composer but it seems like they are not being notified at all. Please find my script below. I am also using the BeforeInsert trigger :
try {
println("Preparing data to send notification.");
def map = new HashMap();
// Notification message
def messageText = "A new unassigned case has been created: " + CaseNumber;
// Assigned Party ID
def recipientPartyId = AssigneeResourceId;
// List of allowed assignee Party IDs
def allowedAssigneeIds = [300000024550281];