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');