Question

Record Deletions - API

  • 14 March 2024
  • 2 replies
  • 32 views

Userlevel 2
Badge

Hello we have a website that syncs in all sorts of data from Acumatica. We sync in StockItems, SalesOrders, Invoices, etc.

My struggle is that when data is deleted from Acumatica, how can I get those updates so I can delete on my side?

One typical scenario is on Sales Orders. Items are often removed from sales orders. I don’t really have a way to get those updates.  

I know I can use push notifications to get these deletes in realtime, but we do more of a night batch process.

Outside of downloading all of our salesorders and doing a comparision of the nightly download and website list...and delete those items that are not in the nightly download.  This process is time consuming unfortunatley. 

I am hoping to find some sort of query I can call that will give me a list of deleted items, maybe by date?

Does anyhow have an insights on how I could approach this?

 

Thanks!

 


2 replies

Badge

I am doing a very similar thing with the Contract table. In the Contract table, there is a column called “DeletedDatabaseRecord”. If this value is set to 1, it means that the record has been deleted from acumatica.

Do you have access to read the database? I don’t know if this approach will work for you. 

Userlevel 6
Badge +5

Many tables don't have that flag unfortunately.  

Are you able to set variables for your sync process? Can you grab min/max dates of records that could possibly have been deleted.

For example if the SO is fully invoiced or the shipment inventory is fully issued, you won't be able to delete those lines.   

Maybe have a column isIssued that is created during your import process, those are essentially safe. 

It may at least greatly reduces the size of the data to import and compare. 

Even if you can't set the date range this way and you have to import all to compare, having that isIssued status would greatly reduce how many records you'll have to compare the full import to.   

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved