Sent/Recieved Emails in Ticket Conversations widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 09:33 PM
Hi Community
Is there anyone in here who have tried to incorporate the "Sent/Recieved Emails" functionality into the Ticket Conversations widget?
The obvious upside for this is that if you do not copy email content into comments its still possible for the end user to see mails back and forth.
Regards
Simon
- 7,488 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2018 07:07 AM
Uhm well exactly there actually...
If you copy everything I've posted (except for the line below, which is at the top of the other post) and put it under this line of code:
record.stream = $sp.getStream(options.table, record.sys_id);
It should work fine imo, since as far as I can tell its all standard SN stuff.
You're additional comments should be visible too though, not sure were that setting is...
Since I'm 'using' the additional comments 'element' for adding the emails.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2018 07:53 AM
I was not able to find the proper place to put this code. I do not have the record.stream line in the OOB Ticket Conversations widget, nor the clone i made that we are utilizing on our Service Portal.
What widget is the code added to ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2018 06:49 AM
Thanks you helped me a lot!
I just had to change record.* with data.* and it worked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2019 06:04 PM
Thanks for sharing this Chris! I've done something similar to this in the past for other purposes - I think it was a customer who didn't want both work_notes and comments. So I disabled comments but modified this to show the work_notes in the portal.
The only things that I'd add here is
1. Life is easier if you create a separate variable containing prettified JSON of record.stream to prettified JSON in the widget and put it in the log while you are developing (actually I prefer to generate an event). This allows you to "see" the structure of the $sp.getStream() output and allows for easier modification.
2. You are sorting on a.sys_created_on_adjusted. This is actually localtime and the format depends on user preferences and locale so it won't always sort correctly. You should sort on a.sys_created_on which is always UTC ISO8601 essentially which will always sort correctly. Of course the widget itself will use sys_created_on_adjusted to display the date/time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2022 09:39 AM
Has anyone implemented this as of late? I can't find the exact line Chris is talking about.
Will mark as helpful etc.