Table Trigger to use after OnModify?

dottocka
Member Posts: 2
Hi,
I'm pretty new to the NAV Development so excuse me if I'm asking too obvious questions
I need to call .NET methods that are directly querying the NAV Data Base and doing external tax calculation for the Sales Order. The call need to be done on every modification to the Order or modification to the Order Sales Lines details.
At first I called the method from the OnModify trigger of the Sales Header and Sales Line Tables but unfortunately I have found out that the changes are still not stored in the Data Base so I can't do the calculations on the changed data.
So my question is: Is there any trigger of event that is triggered after OnModify when the data is already stored in the Data Base?
Thanks
I'm pretty new to the NAV Development so excuse me if I'm asking too obvious questions

I need to call .NET methods that are directly querying the NAV Data Base and doing external tax calculation for the Sales Order. The call need to be done on every modification to the Order or modification to the Order Sales Lines details.
At first I called the method from the OnModify trigger of the Sales Header and Sales Line Tables but unfortunately I have found out that the changes are still not stored in the Data Base so I can't do the calculations on the changed data.
So my question is: Is there any trigger of event that is triggered after OnModify when the data is already stored in the Data Base?
Thanks
0
Answers
-
The way that NAV calculates Sales Tax is not in the OnModify trigger. If you don't know NAV I would never touch Sales Tax.
Have you looked at Avalara? Their product does what it should do but the code is horrible.
Be careful with Sales Tax...0 -
Thanks Mark.
I have already put my code in designated place for external tax calculation implementation which is in the Code Unit 398 Sales Tax Calculate, which is executed when the Order is posted. But my client insist the calculation to be done also on any change of the details of order which is not the case by default in NAV. That's why I'm trying to init the process during the OnModify table trigger.
Yes the Avalara is doing the same thing, I'll try to dig the solution from there.0 -
Clients can insist, but do they understand the product well enough to know what they ask?0
-
Clients can insist to pay to break and pay to fix it again, I guess.
They will have wonderful performance in system
If you have to, you probably want to touch area where amount is getting updated.
You probably don't want to update sales tax when customer just change the description of line.
I would probably enforce them to default to calculate sales tax, so you can keep sales tax calculation code stay in CU3980 -
Hi all,
with latest releases from Avalara, code is moving toward good shape. we are incline towards Code refactor which we are considering with releases on continuous pattern. Let us know your exact need here : sachin.chavan@avalara.com.
Thanks Mark, and nice video https://www.youtube.com/watch?time_continue=4&v=uDFvG64TkEI
Regards
Sachin Chavan
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