doubt in certification exam answer

Tamalika
Member Posts: 5
When does the OnInsert trigger run on a table?
1. Before the record is inserted into the database.
2. After the record is inserted into the database.
In the manual 80436_NAV2013_ENUS_CSINTRO_02 its written "OnInsert contains statements that
implement after a new record is inserted into the table."
But in MSDN http://msdn.microsoft.com/en-us/library/dd301307.aspx
Its given "This trigger executes before default insert behavior occurs. The new record is not inserted if an error occurs in the trigger code."
Which is correct ?
1. Before the record is inserted into the database.
2. After the record is inserted into the database.
In the manual 80436_NAV2013_ENUS_CSINTRO_02 its written "OnInsert contains statements that
implement after a new record is inserted into the table."
But in MSDN http://msdn.microsoft.com/en-us/library/dd301307.aspx
Its given "This trigger executes before default insert behavior occurs. The new record is not inserted if an error occurs in the trigger code."
Which is correct ?
0
Comments
-
Depends.
The reality is that first the OnInsert-trigger is executed and if no error happens, the record is inserted.
The correct exam-response is what they define as correct (and it is not always the reality).Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
1. Before the record is inserted into the database.
You can simply write ERROR('hi'); in OnInsert trigger of Sales Header table
and try to insert new Sales Order record.
It will show error message and the record is not inserted.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