function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jayanth ThathapudiJayanth Thathapudi 

I want to use the role name in HTML email template

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:)
Shruti SShruti S
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
Jayanth ThathapudiJayanth Thathapudi
Thanks for the response Shruti:)

I have already tried it and came to we can only use options for the {!Target_User}

 Options for Targer_user
We can't use the role name here:(