- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2025 11:21 PM
hi everyone i need help to configure the subject in email client templates
here in subject i want incident record's related record short description it is possible to configure ? if yes can anyone help me how to do it
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 12:01 AM
Hi @lalithkumar , For this, we will have to script and query the related records, so we need mail script. But you can't add a mailscript to the subject, but you can call a mailscript in the body and set the subject. Try this -
var gr = new GlideRecord("change_task");
gr.addQuery("change_request", current.sys_id);
gr.query();
if (gr.next()) {
var subject = gr.number + ' - ' + gr.short_description;
}
email.setSubject(subject);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 12:33 AM
Hi @lalithkumar yes. Unfortunately, the email client template does not have access to the 'email' object. Sorry, I missed that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2025 11:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2025 11:41 PM
but i want realted records short description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2025 11:46 PM
Hi @lalithkumar
If there are 5 related records, which record short description must be considered for template?
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2025 11:52 PM
first realted record short description i want to display in subject