Using SuiteQL, sometimes, transactionlines and tra...
# ask-stanley-ai
j
Using SuiteQL, sometimes, transactionlines and transactionaccountinglines disappear (hard deleted). What is the best way to find which ones disappeared?
c
AI generated answer (using internal Slack threads):
To find which transaction lines and transaction accounting lines have disappeared (hard deleted) using SuiteQL, you would need to have a reference point or a snapshot of the data before the deletion occurred. This could be a backup or a log of the data. Here's a general approach: 1. Create a snapshot of your data: Before any changes are made, create a snapshot of your transaction lines and transaction accounting lines. This could be done by running a SuiteQL query to select all records from these tables and storing the results in a separate location. This will serve as your reference point. 2. Compare the snapshot with the current state: After the deletion has occurred, run the same SuiteQL query to select all records from the transaction lines and transaction accounting lines tables. Compare this result with your snapshot. Any records that are in the snapshot but not in the current state have been deleted. Here's a sample SuiteQL query to select all records from the transaction lines table:
Copy code
sql
SELECT * FROM TransactionLines
And for the transaction accounting lines table:
Copy code
sql
SELECT * FROM TransactionAccountingLines
Remember to replace
TransactionLines
and
TransactionAccountingLines
with the actual table names in your NetSuite account. Please note that this approach assumes that you have the necessary permissions to access these tables and that you have a way to store and compare the data. Also, this approach will not work if the deletion has already occurred and you do not have a snapshot of the data before the deletion. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818502307
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.810375035
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.809151113
Please provide your feedback on this answer.