Learn about Redwood and be one of the first to join the conversation

Visit Redwood Community
Get user job role in resource object custom field — Cloud Customer Connect
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
31
Views
7
Comments
in Sales 7 comments

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

 }

}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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