- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2026 08:29 AM
Where is this Apply Template button defined? It appears on the email template card under Email template contextual sidebar.
The reason I ask is that, for a particular template having two To email addresses, when I apply it to my email, the addresses appear to be duplicated. That is, one data pill appears twice, while the other does not appear.
But if I copy the data pills out to a text editor, the labels are wrong while the underlying addresses are correct.
"Insider Threat" <Legal_LitHold@xxxxx.com>
"Insider Threat" <InsiderThreat@xxxxx.com>
So the data pills are getting messed up, somehow. This doesn't happen for any other case.
So I want to get a look at the code that is running when I click on Apply Template, but the debugger doesn't tell me anything. Where does this button live?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi, the Apply Template button isn’t a standalone script you can find in a business rule or UI action. It is part of the email composer component used in Workspace. The component documentation lists “Apply Template” as one of the controls in the mini email composer, and the same action also appears from the Email template icon in the contextual sidebar. That is why the debugger shows nothing, as the logic runs in the UI Builder component and not in server-side script.
To look at how it is wired, you can follow this path.
- Go to All > UI Builder and open the experience for your workspace (for example, the one for HR Case Management).
- Open the record page variant you use, such as Case SRP. Duplicate it before changing anything, since it is an out-of-box record.
- Select the Activity Stream Compose node, and check its email composer configuration and event handlers.
- Use the browser developer tools Network tab while clicking Apply Template to see which data resource is called.
The template content itself comes from Email Client Template records (sys_email_client_template_list). A community answer notes these are configured per table. So the recipients are defined on that record, which is the best place to check your duplicate pill.
- Open the Email Client Template and look at the Recipients (To) field.
- Check that the two addresses are separated by a comma only and don’t carry the same display name in the “Name <email>“ format.
- Try one address as a plain email address to see whether the pill label then displays correctly.
- Test with the second address first, to see if the issue follows the address or the position.
Since the underlying addresses are correct when copied, this looks like a display issue with the pill labels and not a delivery problem. I couldn’t find a documented cause for it, so if the steps above don’t resolve it, a support case with a reproducible template would be the safe next step. Test in a sub-production instance before changing production templates.
Hope you found it helpful.
Sources:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Very helpful, thank you. ServiceNow confirmed this behavior is a known defect, with a fix coming in Canada. There is a workaround, a new true|false property "glide.email_client.emails_as_pills.enabled" that inactivates the display of the email addresses as data pills. I tested that in our lower env and it fixed the issue.
See: PRB2097043