Skip to Main Content

General Development Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Sending Email using the Groovy script triggers

Jithu GopiJan 13 2025

Hi everyone,

I’m working on the Service Request object in Oracle Sales Cloud and need to send email notifications when a service request is closed. While I understand that I can use workflow notifications to trigger emails, my challenge is displaying the sent email content on the UI for the user.

I’m trying to use Groovy script triggers to send the email, but I’m unsure how to capture and display the email content on the UI after it's sent. Has anyone worked with a similar scenario or encountered similar requirements? Any suggestions on how to send the email through Groovy scripts and display the content in the UI would be greatly appreciated!

Thanks in advance!

Here’s the code I’m using to display the mail details in the UI

def SrId = getAttribute('SrId');
def objRelationship = newView('SrMessageVO');
def newRelationship = objRelationship.createRow(); 
newRelationship.setAttribute('MessageTypeCd', 'ORA_SVC_RESPONSE');
newRelationship.setAttribute('ChannelTypeCd', 'ORA_SVC_EMAIL');
newRelationship.setAttribute('SrId', SrId);
newRelationship.setAttribute('MessageContent', 'This is a test message'); 
newRelationship.setAttribute('Subject', 'test Message'); 
newRelationship.setAttribute('StatusCd', 'ORA_SVC_COMMITTED');

Comments

Dwayne Miller Jan 14 2025

FYI… the stack trace shows this method as the one responsible for the exception, but not sure how it is trying to determine the local offset.

Oracle.DataAccess.Types.TimeStamp.GetLocalTZOffset()

1 - 1

Post Details

Added on Jan 13 2025
0 comments
90 views