We use SuiteQL to extract journal entries. For that we leverage the transaction, transactionline, and transactionaccountingline tables. We are having issues when journal entries are changed.
If after a journal entry has been approved and posted in the ledger and something has been determined wrong with the journal entry. Our Corporate Controller will go into Netsuite and edit the journal entry with the problem and change the status of the journal entry to unposted. This gives the accountant the ability to edit and correct the entry and then the Corporate Controller will approve the entry which will change the status to posted again. That is what happened in this case. The only unusual aspect of this entry was that the original journal entry was determined to be not needed and the accounting period.
What we are seeing on our side is that the entries have been removed from the transactionline and transactionaccountingline tables.
Since there is no indication that any rows are missing we do not have any way to make sure that our previously extracted data is correct. Due to the fact that the unposted lines are not returning from the API we cannot identify these lines and mark them accordingly. We are using the lastmodifieddate field to determine which records were updated in each table in order to not get the full list every single time.
Is there a way to identify when rows have been removed from those tables, or is there another table that can show the history of this journal entry to help us identify which rows are valid and which are not?