skuruvil
02/03/2025, 4:47 PMCeligo AI
02/03/2025, 4:48 PMAI generated answer (using internal Slack threads):In order to identify when a transaction was deleted in NetSuite, you can use the
getDeleted
operation. This operation returns a list of all records of the types specified in the filter that have been deleted within a specified date range.
Here is a sample code snippet in SuiteScript:
javascript
var filters = [];
filters[0] = new nlobjSearchFilter('type', null, 'anyof', 'transaction');
filters[1] = new nlobjSearchFilter('date', null, 'within', '01/01/2021', '12/31/2021');
var columns = [];
columns[0] = new nlobjSearchColumn('type');
columns[1] = new nlobjSearchColumn('name');
columns[2] = new nlobjSearchColumn('deleteddate');
var searchresults = nlapiSearchRecord('getDeleted', null, filters, columns);
This script will return all deleted transactions within the specified date range. The getDeleted
operation is available in both SOAP and REST APIs.
Please note that the getDeleted
operation only returns records that have been deleted, not records that have been edited or otherwise modified. If you need to track changes to records, you might need to implement a different solution, such as using system notes or audit trails.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
02/03/2025, 4:48 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.795149684
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.782441556
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.780816078
Celigo AI
02/03/2025, 4:48 PM