Get user job role in resource object custom field
Summary:
In Resource object we have a custom text field. And we wanted to populate that field if the resource has the specified job role tagged. We wrote below script in resource object Before Update in database trigger.
But the value is not getting set.
if(Username != null)
{
def x = Roles.toString()
if (x == 'Sales Representative') {
setAttribute(UserRole_c,'Sales Representative')
}
}
Tagged:
0