Skip to main content
Jayanth Thathapudi (Accordion) a posé une question dans #Apex
I want to use the role name in HTML email template and I have used the below to get Role of the user but it is displaying as null

{!Target_User.UserRole.Name}

Any help is highly appreciated:)
2 réponses
  1. 28 juin 2018, 10:49

    Accessing fields on related object is not possible. You can access fields only on the object. So to achieve this, you will have to create a formula field on the User object and access that formula field here. The formula that you will have to create on the User object is as below: 

    UserRole.Name