email icon

Tyler Hoge - Gl
Tera Guru

Does anyone know if the code for this button on incidentmailIcon.pngis available or does anyone know how it works? Im trying to replicate functionality, but cant find it anywhere.

8 REPLIES 8

eican
Kilo Guru

You should be able to get it using "inspect element" of your browser web development tools (e.g. firebug for firefox)


<a id="email_client_open" onclick="emailClientOpen(this, 'incident');"><img class="i16x16" title="Email" src="images/icons/email.gifx"/></a>




so this is what I found, but I don't know what to pass to emailClientOpen(). there is no script include that I could find.



it works, but this just opens a blank email with the incident number and short description in the subject, the caller as the send to, and the opened by as a CC. Is that all this can do? What about pre-populating the body?


For that you can create an email template.


Also there was a forum post for doing custom templates based on field values of the current record.


Hi Tyler Hoge I had the same issue, and was going crazy for why we can't pass additional arguments on the emailClientOpen(this, 'incident'); However I manager to create my template and also add all fields from my form "Change form in may case, but will work for incident and requests and all other forms". In fact i didn't create a new template, I changed the one already in "Client Templates". So find the Client Template that you want to edit and, and add your form fields as variables like:


Change No.: ${number}


Parent Ticket No.: ${parent}


........


.....


..


.


Before that, you will need to:


Enabling the Email Client

Administrators can enable the email client for a specific table, such as Incident, by adding the email_client attribute.


  1. Open a record in the appropriate application. For example, open any incident record.
  2. Right-click the header bar and select the appropriate option for your version:
    • Fuji or later: Configure > Dictionary
    • Eureka or earlier: Personalize > Dictionary
  3. Select the first record in the Dictionary Entries list. This has the record type collection and does not have any entry for Column name.
  4. In the Attributes field, enter email_client=true. If there are any other values in the field, be sure to use a comma as a separator character.
  5. Click Update.


Email client dictionary entry

Note


Note: This capability is not inherited by tables that extend the current table. For example, enabling t

For more info look at: Enabling the Email Client - ServiceNow Wiki




Best regards,



Nabil O.