Using variables from currently logged in user in Email Client Template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2024 06:11 AM
I've created an Email Client Template to be used from within CSM, to include an autosignature. As it is now, the autosignature includes variables for the current case (task) from our Investor Relations table. For example:
${assigned_to.first_name} ${assigned_to.last_name}
${assigned_to.u_functionaltitle}
My Company | ${assigned_to.location.city}, ${assigned_to.location.state}
T: +${assigned_to.phone}
${assigned_to.email}
Is there a way to include variables for the currently logged in user, rather than the assigned to person for the case? They wouldn't necessarily be the same person. We've tried a couple of things that didn't work:
${gs.getUser().first_name} etc.
<mail_script>
template.print( gs.getUser().getFullName() );
</mail_script>
Note that this is an Email Client Template (in the sys_email_client_template table) not a Response Template or system notification email template.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Old post, but providing answer for anyone else that come after.
Use ${current_user}
Additionally, this can be used to get attributes from the user record. However, it cannot dot-walk to reference tables.
Will Work
${current_user.location}
Will NOT work
${current_user.location.city}