What are events exactly for? DIfference between normal Function call and Events

marcussulic
Member Posts: 15
Hello community,
I just learnt about NAV Possibilities around Events (Subscriber/Publisher etc) and watched some videos for example
https://www.youtube.com/watch?v=Cjt8aQC2aC8&t=3s.
While it surely sounds fun, I struggle to understand what they are exactly for? I must be missing something basic because for me theres no difference between Events which will run some code placed in some external Codeunit and normal function calls which will do the same for me.
Oh yeah the only difference would be that its way harder to debug because you cant "go to definition".
I gladly accept every form of help.
Thanks in advance!
Best regards.
I just learnt about NAV Possibilities around Events (Subscriber/Publisher etc) and watched some videos for example

While it surely sounds fun, I struggle to understand what they are exactly for? I must be missing something basic because for me theres no difference between Events which will run some code placed in some external Codeunit and normal function calls which will do the same for me.
Oh yeah the only difference would be that its way harder to debug because you cant "go to definition".
I gladly accept every form of help.
Thanks in advance!
Best regards.
0
Answers
-
Hi, the purpose is so you can hook into system events. So you do not have to modify Standard NAV code at all to include your own custom code. This makes it easier to upgrade & manage.0
-
But you still have to put the event handler in your code and therefore change the code, dont you? Its only 1 line of code but cant you accomplish the same with just a function call to some external codeunit, cant you?0
-
Yes, you can accomplish the same with a function call to an external codeunit, but in case you can use the published events by MS, you do not have to modify the existing standard code base. This obviously makes upgrades a lot easier.0
-
Hi marcussulic,
If you don't care about not modify standard objects in order to save time (money) for upgrades (Cumulative Updates also) then the events are useless
But, you will soon use them (aside Extensions) when MS cuts NAV OnPremise0
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