Where are emails saved in the database?

Emails are saved in tbNotes and are linked to documents by the FieldNames GUIDLink, DocType, and NoteType.

It's suggested to use database views for reporting purposes. All emails can be referenced in the database view named "Notes" and are saved in tbNotes. Notes.GUIDLink is what is used to link to the actual document. Notes.Note is where the body of the email is saved. Notes.DocType = E is for Emails. 

The FieldName NoteType is used to identify which document a note or email is linked to. The Note Type is found in the following database Views ([View].[FieldName]):

NoteType Description
A Customer Account
C Customer Credit
I Product
L CustomerShip
N Customer Invoice/Credit
O Sales Order
P Purchase Order
S Business Activity
T Track & Trace

For NoteType 'O' (Sales Order), join Notes.GUIDLink to Orders.GUIDorder. For NoteType 'P' (Purchase Order), join to PO.GUIDPO. GUIDLink connects to the document, while NoteType shows the document's source.


More information can be found on our Docs page