Different Ways to Extract Line-Level System Notes for Multiple Lines and Records

NetSuite Transaction Records’ System Notes allows users to view a log of all changes made to a transaction record. However, the System Notes from the transaction page only show changes in the transaction’s body fields, while line-level system notes must be opened one at a time by clicking on “History” in each line.

There are two ways to check the logs for the changes done within the sublist for multiple items or records.

1.      You can use the Transaction Saved Search in the NetSuite UI, which allows you to add “Line System Notes” Fields in both the Filter and Columns.

image.png
image.png

2.      You can take advantage of the “N/search” module within SuiteScript. This module provides a powerful and flexible way to direct NetSuite to perform specific actions related to the search results of your line-level system notes. For instance, you can configure NetSuite to send email notifications when changes are made or modify certain field values based on your search criteria.

To get started, check out the sample script snippet provided in the code below. Use it as a reference to help you create your own SuiteScript solution tailored to your needs.

var salesOrdSearch = search.create({

  type: “salesorder”,

  filters:

  [

     [“type”,”anyof”,”SalesOrd”],

     “AND”,

     [“internalid”,”anyof”,”6″],

     “AND”,

     [“linesystemnotes.context”,”noneof”,”@NONE@”]

  ],

  columns:

  [

     search.createColumn({name: “tranid”, label: “Document Number”}),

     search.createColumn({name: “entity”, label: “Name”}),

     search.createColumn({

        name: “context”,

        join: “lineSystemNotes”,

        label: “Context”

     }),

     search.createColumn({

        name: “date”,

        join: “lineSystemNotes”,

        label: “Date”

     }),

     search.createColumn({

        name: “field”,

        join: “lineSystemNotes”,

        label: “Field”

     }),

     search.createColumn({

        name: “newvalue”,

        join: “lineSystemNotes”,

        label: “New Value”

     }),

     search.createColumn({

        name: “oldvalue”,

        join: “lineSystemNotes”,

        label: “Old Value”

     }),

     search.createColumn({

        name: “record”,

        join: “lineSystemNotes”,

        label: “Record”

     }),

     search.createColumn({

        name: “recordid”,

        join: “lineSystemNotes”,

        label: “Record ID”

     }),

     search.createColumn({

        name: “recordtype”,

        join: “lineSystemNotes”,

        label: “Record Type”

     }),

     search.createColumn({

        name: “role”,

        join: “lineSystemNotes”,

        label: “Role”

     }),

     search.createColumn({

        name: “name”,

        join: “lineSystemNotes”,

        label: “Set by”

     }),

     search.createColumn({

        name: “type”,

        join: “lineSystemNotes”,

        label: “Type”

     })

  ]

});

var searchResultCount = salesOrdSearch.runPaged().count;

log.debug(“salesOrdSearch result count”,searchResultCount);

salesOrdSearch.run().each(function(result){

  return true;

});

3. Finally, you can use SuiteAnalytics Connect or SuiteScript’s N/query module, which is a reporting and analysis tool that enables you to extract data from NetSuite and use it for your reports. Using queries like the sample query provided below, you can extract the line-level system notes for specific records, fields, and conditions.

Sample Query: SELECT * FROM systemnote WHERE recordid = ‘6’ AND field LIKE ‘TRANLINE%’;

image.png

In summary, by using the Transaction Saved Search, SuiteScript, or SuiteAnalytics Connect, you can easily view line-level system notes for multiple items or records, which can help you track changes more efficiently, flexibly, and effectively.

Related SuiteAnswers:

9052 Line-Level Audit Trail for Transactions

43702 N/search Module

77359 N/query Module

Leave a comment

Your email address will not be published. Required fields are marked *