Wednesday, May 14, 2014

debug creation, modification, deletion with doInsert, doUpdate, doDelete

hi all,

Sometimes you just want to find out when a record is created, modified or deleted. The .insert, .update and .delete methods are the place to be, we all figured that out. But it happens some sneaky code uses the .doInsert, doUpdate or .doDelete methods. Your breakpoints in .insert, .update or .delete are silently ignored (as expected), there is no way to xRef on doInsert/doUpdate/doDelete ....  and you're still eager to catch when those insert/update/delete's are happening.
Well there seems an easy trick to cach even those: use the .aosValidateInsert, .aosValidateUpdate and .aosValidateDelete methods!

Enjoy!

2 comments:

  1. Hi, thanks, I haven't used it this way yet. Btw you can find doXXX methods in xRef. Go to Development Tools -> Cross-reference -> Names (or just open form xRefNames from AOT). There set criteria like this: "Type name" == < Table name>, "App.. object name" == < Method name>, "App.. object type" == TableInstanceMethod.

    ReplyDelete