Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Deleted records

Question
Nezla · Jul 14, 2022

Deleted records

Hi Guys,

is there a way to get an audit or a record of deleted records in a class?

so basically, I'm looking for way to track delete record or from which class or class method call that delete statement was executed,  my understanding is that so for example using %OnfterDelete  I can track any deleted record using %Delete(), so if the user execute a (Delete from myclass)   sql statement can OnfterDelete track that ?

the reason why, is that we have a class where records keeps disappearing (delete) from it and we don't know where or how is this happening, in our software we have 5 places where we delete records from this class but we did put tracking code on them and none of these 5 places has been executed but records keeps getting deleted, so is there a way or piece of code that we can add to our class that can checks when or which call is deleting records?

   

 

Thanks

   

#Ensemble
Product version: Ensemble 2014.1

Source URL:https://community.intersystems.com/post/deleted-records