How to insert Caller name in Incident template

Kazu4
Giga Contributor

Id like to create incident template for contacting customers.

I want to insert customers name in "Additional comments" automatically,
so entered as below,

javascript:"Dear "+gs.current.caller_id.LastName()


but the result is "Dear undefined".

How can I insert caller user name of current incident?

1 ACCEPTED SOLUTION

gs.getUserDisplayName is based off the current logged in user, not fields on the form. As provided previously, your only option for this is Response Templates rather than the classic templates.

View solution in original post

6 REPLIES 6

Rekha Esadkar
Tera Expert

Hi @Kazu,

I tried on my Instance.And its working Please check code

javascript:"Dear "+gs.getUserDisplayName()

and for all View means when you impersonate user then current user will populate in additional comment for that you have to right in global field.

But it will Add current logged in users name

find_real_file.png

 

Please mark it as helpful (or) correct if  it is helpful.

and if you any query then reply.

Hi Rehka,

Thanks for reply.
But this one returns current logged in user.
Is there any way to return Caller name of the Incident record?

Thank you.

Kieran Anson
Kilo Patron

Hi,

For this sort of template fill look into response templates which were designed for this purpose.

Response Templates

Hi Kieran,

Thank you!
This would perfectly work for my requirement,
but at the moment, response template is not activated in our instance.

Ill contact IT team if it could be activated.
Thanks.