When working with transactions in NetSuite, it’s often important to access the notes associated with them—especially for audit trails, collaboration, or historical context. These notes are stored in the TransactionNote table and can be retrieved using a simple SQL query.
✅ Sample Query to Retrieve Transaction Notes
SELECT TO_CHAR(TransactionNote.NoteDate, 'YYYY-MM-DD @ HH12:MI PM') AS NoteDate, (Author.FirstName || ' ' || Author.LastName) AS Author, BUILTIN.DF(TransactionNote.Direction) AS Direction, TransactionNote.Title, TransactionNote.Note FROM TransactionNote INNER JOIN Employee AS Author ON Author.ID = TransactionNote.Author WHERE Transaction = 999999 AND NoteType = 7 ORDER BY TransactionNote.NoteDate DESC;
Show more lines
🔍 Key Highlights:
- Note Date Formatting: The
TO_CHARfunction is used to format the note date in a readable format (YYYY-MM-DD @ HH:MI AM/PM). - Author Details: The query joins the
Employeetable to fetch the full name of the note’s author. - Direction Field: The
BUILTIN.DFfunction is applied to theDirectioncolumn to return the human-readable text value (e.g., “Inbound” or “Outbound”). - Filtering: The query filters for a specific transaction (
Transaction = 999999) and a specific note type (NoteType = 7), which you can adjust based on your use case.
This approach ensures you get a clear, organized view of all relevant notes tied to a transaction, helping teams stay aligned and informed.