Groovy script sending out incorrect notification — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!