Quick messages - how can I pre-populate the to and CC fields?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2022 09:25 AM
Hi,
I've set up a quick message template to allow users to send out emails with key information about incidents.
However, I would like to be able to pre-populate the to field in the quick message with the members of a group which would be defined based upon where the incident was assigned. So if it was assigned to Helpdesk, there would be a group called Helpdesk-alert (or something like that) which would contain the users who need to receive the email.
The user can then add or remove further users as required.
It seems like similar is possible from searching in the community but I can't work out exactly how to do this. If having the two groups is a problem them I'm happy to consider other options or even another incident attribute which can be used to formulate a distribution list.
Many thanks - I'm still a newbie so apologies if this is basic stuff 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 08:39 AM
To get the current logged-in user's email in the "Quick Message" follow these steps:
In the sys_email_client_template, navigate to the "Receipt" Tab and add the following JavaScript code to retrieve the logged-in user's email: javascript:gs.getUser().email
(the code can be added to the "To", "Cc" and "Bcc")- If you need to retrieve the email on other tables, you can use something like:
requested_for.email (field_name.email)
This method will work wherever the email retrieval code is added. If you want this to apply across multiple ITSM tables, you will need to add the code to each template separately. - After implementing this, when you click on the "Quick Message" in whichever table you have the template, the email field will auto-populate with the appropriate email.