Redwood HR Helpdesk - How to run server scripts after the current user replies to a HD message?
Hi All
We are working with Help Desk and are trying to automatically change the status of a request once a user (Primary Point of Contact) has replied to, or sent a message. We have the current groovy script code:
def parentSR = HRHelpDeskRequest
def msgSource = SourceCd
def msgChannel = ChannelTypeCd
def parentStatus = ServiceRequest?.StatusCd
def msgType = MessageTypeCd
def messages = childMessages
try {
if (parentSR.StatusCd == 'ORA_SVC_HRHD_WAITING') {
if (parentSR.PrimaryContactPartyName == parentSR.LastUpdatedByDisplayName) {
parentSR.setAttribute('StatusCd', 'ORA_SVC_HRHD_INPROGRESS')
}
}
} catch (e) {
throw new oracle.jbo.ValidationException('Failure to trigger HRHD_RESOLVE_REQUEST Notification from Groovy Script: ' + e.getMessage() + parentSR.StatusCd)