Groovy script sending out incorrect notification
Summary:
Content (please ensure you mask any confidential information):
I removed the script which notifies the employee when they submit a request. For some reason it was incorrectly being triggered at the same time the request is resolved. This is the script I was using set to BeforeUpdate :
try {
def recipientPartyId = PrimaryContactPartyId;
def messageText = "Your request (SR" + SrNumber + " - " + Title + ") has been successfully submitted.";
if (recipientPartyId) {
def map = new HashMap();
map.put("Channels", ["ORA_SVC_BELL", "ORA_SVC_EMAIL"]); // Bell and Email notification
map.put("MessageText", messageText);
map.put("RecipientPartyId", recipientPartyId);
map.put("ObjectCode", "HRHelpDeskRequestVO"); // Reference parent object
map.put("ObjectId", SrId); // Associate notification with the specific request
Tagged:
0