Add Title and Case Number to the Subject Line of an Email sent from CASE entity.

By Dianna on 3/6/2014

This simple JavaScript copies the title of the case and the case number into the subject line of a new email created for the case.

If you wish to modify the JavaScript and you are not sure how to do so, add your comment to this post and we will respond ASAP

Download Java Script from this location.

Settings>Customization>Customize the System

From the left pane select Web Resources and click New to create new Web Resource.

Name: EmailFromCase

Display Name: Email From Case

Type: Script (Jscript)

You can either use the Text Editor to copy and paste the JS or upload from file

Click Save



Now add the JS Web Resource to the Email Entity, and trigger the script on load (when you start new Email).

From left pane extend the Entities node. Scroll down to the Email entity>Forms and select Email main form.

Click: Form Properties

Click Add to add the “Email From Case” web resource to the Form Libraries section.

In the Event Handlers section click Add>Select EmailFromCase and enter the function name: EmailFromCase in the Function fields.

Click OK, Save & Publish All Customization

Testing the solution

GoTo Settings>Service>Cases and open a case

Click: Add Task and select Email

The subject line of the Email includes the Title of the case plus case number