Groovy Scripting : Set Attribute of Custom Field Based on the Value of Standard Field
In relation to my previous inquiry Groovy Scripting: Split / Trim, I have made it work. However, since formula text field cannot be displayed to OTBI analysis report, I am finding another way to show it to the report. I have created another custom text field and created a field trigger, but it is not working.
Trigger: After Field Changed
Field Name: Email
Script:
def position = Email.indexOf("@")
def email = Email.substring(0,position)
def CustomField = CustomField_c
if (ResourceOrgRoleName.contains('<role>')) {
setAttribute(CustomField, email)}
else null
The field has still no value. What might be possibly wrong or missing with the script? Or should it be an object trigger?
0