Get Started with Redwood for Oracle Cloud HCM Begin Now
To ensure that questions get required attention from community members and are NOT left unanswered, it’s important for the author to indicate (by selecting “Yes” or “No” when prompted) whether the question was answered. (newly added) Please note that it is also important to respond to EACH comment your question receives. Your Yes or No response ensures an accurate status for your question.
For more information, please refer to this announcement explaining best practices for getting answers to questions.
For more information, please refer to this announcement explaining best practices for getting answers to questions.
Groovy script for notification when SR is ORA_SVC_CLOSED
Summary:
Hello, I need to send a notification when an SR move from status Resolved to Closed,
I try to write a groovy with bot triggers Before update and Before insert and enable the Notification preferences
if (isAttributeChanged('StatusCd')&& StatusCd == 'ORA_SVC_HRHD_CLOSED') {
try {
def recipientPartyId = PrimaryContactPartyId
def messageText = 'BLA BLA BLA.'
if (recipientPartyId) {
def map = new HashMap();
map.put("Channels", ["ORA_SVC_EMAIL", "ORA_SVC_BELL"]);
map.put("MessageText", messageText);
map.put("ObjectCode", "HRHelpDeskRequestVO");
map.put("ObjectId", srId);
map.put("RecipientPartyId", recipientPartyId);
adf.util.sendNotification(adf, map)
} else {
println("No Assignee associated with this SR")
}
} catch (e) {
Tagged:
0