- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-17-2024 04:35 AM
Hello Community,
We have
Email Client Template - for sc_request
and want to have cc field populated with current logged in user. Have mail script created but cc field is not populated.
I tried running in Fix script it gives email address totally correct but somehow not working in Email.
Can you suggest what I am doing wrong here please.
Here is snap shot of mail script and Email client template.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-17-2024 04:53 AM - edited ā04-17-2024 04:54 AM
You don't need an email script. You can just add this in the CC field of the Email Client Template:
javascript: (function() {
var user = new GlideRecord('sys_user');
user.get(gs.getUserID()); // Retrieves the current user's record
return user.email; // Returns the current user's email address
})()
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-17-2024 04:53 AM - edited ā04-17-2024 04:54 AM
You don't need an email script. You can just add this in the CC field of the Email Client Template:
javascript: (function() {
var user = new GlideRecord('sys_user');
user.get(gs.getUserID()); // Retrieves the current user's record
return user.email; // Returns the current user's email address
})()
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-17-2024 04:55 AM
Not sure why it keeps setting the first part wrong. That should just be [ javascript: (function....] and not ":"
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark