Skip to main content
Jayanth Thathapudi (Accordion) 님이 #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개
  1. 2018년 6월 28일 오전 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