Grab emails sent using Email Client and add into activities (filtered)

carlos_monchuch
Giga Contributor

Hi all, seen a few threads on this and none seem to answer the question exactly.

What i need is a way to grab the email sent using the email client, and insert into activities, just like customer communication does.

Yes i can insert this into the comments field, but that will duplicate the email, i can add to work notes, but that adds confusion.   I just would like to insert into activities somehow?

In previous posts answered, advice is to add "send/received emails" to the activities filter, this works fine for comments updated but not when email client is being used to send.

On that, if i could make the comments section an HTML field, and add an attachment function to the field all my issues would be solved, i could remove the email client icon all together form the top right as the only reason this is used mainly is to add attachments.

Any assistance appreciated.

1 ACCEPTED SOLUTION

jagannaths
Kilo Expert

Hi Carl,



The sent/received emails should also show the emails sent using the "email client". Just confirming, you are using the OOB email icon that appears on the top of the screen, correct?



Swathi


View solution in original post

9 REPLIES 9

jagannaths
Kilo Expert

Hi Carl,



The sent/received emails should also show the emails sent using the "email client". Just confirming, you are using the OOB email icon that appears on the top of the screen, correct?



Swathi


Yes I am using the OOB email client...and what the !!!! seems to be working, i think my error may have been in DEV not having the outgoing emails turned on as only does that once sent. my bad, thanks for the advice.


I have created a custom table which extends the Task table.     On the form I have added the email_client icon following the instructions in the wiki.



    http://wiki.servicenow.com/index.php?title=Enabling_the_Email_Client



The email client works fine and sends the email but the outbound email is not added to the activity stream on the task.   I have tested in both Development and Production and neither work.



When testing the same functionality with an Incident the email does get added to the activity stream.   This leads me to believe that there is a Business Rule or something else that handles adding the email to the activity but after much searching I have yet to find it.       Running Eureka Patch 9.



Thanks,



Michael


I found something interesting that appears to indicate that there is no business rule. It has to do with querying records in the sys_history_line tables.   I turned on Debug SQL (under System Diagnostics) and then viewed an Incident and a record from my custom table.  



In both cases sys_history_line0002 is queried looking for records in which the 'field' column matches a set of values.



Incident



SELECT ... FROM sys_history_line0002 where 'field' in ('assigned_to','cmdb_ci','incident_state','impact','priority','opened_by','work_notes','comments','email','relation')



Custom Table



SELECT ... FROM sys_history_line0002 where 'field' in ('assigned_to','cmdb_ci','incident_state','impact','priority','opened_by','work_notes','comments')



So, in the case of the custom table records of type 'email' and 'relation' are not being queried, even though I can see that a history line for the email from my custom table does exist in the history table.  



Now I just need to find out how to get the query to include the 'email' field type.



  Michael