Function “OnAfterOnDatabaseDelete” from the codeunit 1 ApplicationManagement

Loufus
Member Posts: 5
Hello everyone
I am using the function “OnAfterOnDatabaseDelete” from the codeunit 1 ApplicationManagement to record the deletions that happened from the database

I am not recording every single deletions, I am actually using a setup table that contains the tables I need to record
However, the problem is that this function only catches the deletion that happen from standard tables (such as Sales Header, Customer …) but it does not catch those that happen from custom tables.
Any idea how I can make it work for custom tables
Thanks in advance.
I am using the function “OnAfterOnDatabaseDelete” from the codeunit 1 ApplicationManagement to record the deletions that happened from the database

I am not recording every single deletions, I am actually using a setup table that contains the tables I need to record
However, the problem is that this function only catches the deletion that happen from standard tables (such as Sales Header, Customer …) but it does not catch those that happen from custom tables.
Any idea how I can make it work for custom tables
Thanks in advance.
0
Best Answer
-
Make a GetDatabaseTableTriggerSetup subscriber and set OnDatabaseDelete parameter TRUE for all your tables. Don't set any FALSE or else you influence standard functionality.1
Answers
-
Make a GetDatabaseTableTriggerSetup subscriber and set OnDatabaseDelete parameter TRUE for all your tables. Don't set any FALSE or else you influence standard functionality.1
-
Thanks a lot that seems to be working0
-
Could you not just use Change Log Entries to track the deletes from the tables you require?0
-
@robbonick that would cause the Change Log Entries to flood with info you would like to use otherwise.0
-
Yeah I guess if you are tracking Modifications, Inserts and Deletes for the given table. I guess I was just trying to offer an option which requires no code changes. Of course I understand there are instances where this is not a viable option.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions