Quick messages

Prajwal G Vaish
Giga Guru

Hi Everyone,

Is there any way to configure quick message in such a way that it includes and populate To, CC and Subject in the email when selected.

Thank you.

9 REPLIES 9

Syedmd08
Kilo Guru

Yes, it is possible to configure Quick Messages in ServiceNow to include and populate To, CC, and Subject in the email when selected. Here are the steps to do so:

  1. Navigate to the Quick Messages module in ServiceNow.
  2. Click on the Quick Message you want to configure.
  3. In the Quick Message form, click on the "Script" tab.
  4. In the "On Click" script section, add the following code:

//Get the email client
var emailClient = new GlideEmailOutbound();

//Set the recipient
emailClient.addRecipientFields("recipient_field_name");

//Set the CC
emailClient.addCCFields("cc_field_name");

//Set the Subject
emailClient.setSubject("Your Subject");

//Set the Body
emailClient.setBody("Your Message Body");

//Send the email
emailClient.send();

 

Note: Replace "recipient_field_name" and "cc_field_name" with the names of the fields that contain the email addresses of the recipients and CCs respectively.

  1. Save the Quick Message form.

Now, when you click on the Quick Message, it will automatically populate the To, CC, and Subject fields in the email with the values from the corresponding fields in ServiceNow.

 

Please mark my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi @Syedmd08 
Thank you for your response, I am not able to find script section in the quick message form.

PrajwalGVaish_0-1683005611653.png

Please can you help me out with it.

Thank you.

Karan Chhabra6
Mega Sage
Mega Sage

Hi @Prajwal G Vaish ,

 

Navigate to 'sys_email_client_template.FORM' and create a new record there, specify the table name and filter conditions, please refer to the OOB records as well.
If you are creating this on task or request, you can fetch variable values example,  variables.requested_by

KaranChhabra6_0-1682714863004.png

You can specify to,cc in the recepients tab

KaranChhabra6_1-1682714922768.png

 

If my answer has helped with your question, please mark it as helpful and accepted solution.

 

Thanks,

Karan

 

 

Prajwal G Vaish
Giga Guru

Hi @Karan Chhabra6 ,
Thank you for your response, But I need to auto populate To, CC  using Quick messages.

Thank you.