Help Desk: Display Sender Email for External Users, Vendors, and Ex-Employees
We have a requirement to fetch and display the sender's email address in both the Help Desk list view and the ticket details page.
To achieve this, we created a custom field (EmployeeEmail_c)
Groovy:
def hcmPersonListVL = hcmPersonList
while (hcmPersonListVL.hasNext()) {
def hcmPersonListRow = hcmPersonListVL.next()
def primaryFlag = hcmPersonListRow?.PrimaryFlag if (primaryFlag == "Y") {
def employeeEmail = hcmPersonListRow?.EmailAddress
if (employeeEmail != null) {
setAttribute('EmployeeEmail_c', employeeEmail) break }
}
}
The issue is that this logic only retrieves email addresses for internal employees that exist in HCM. It does not populate the email address for external senders such as vendors, customers, or other non-worker contacts who create Help Desk requests via email.