You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Get user job role in resource object custom field

Received Response
in Sales 7 comments


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



Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!