Events and extensions in LS Nav: what they are, and why they are exciting

LS Retail | 17 December 2018

Events and extensions in LS Nav: what they are, and why they are exciting

Microsoft’s introduction of events and extensions for their popular Microsoft Dynamics NAV product in 2016 was a big deal, and these two innovations continue to be critical for NAV developers and users. LS Nav also uses the events and extensions technology. But what do those two words really mean in the LS Nav environment?


Events are remarkably logical when you understand them. They are notifications, or signatures, from LS Nav or Dynamics NAV that let subscribers know that something has happened in the system. Subscribers are other programs, apps, or add-ons that want to be notified of some event happening. Once the subscriber detects the events, then it can run whatever programming it needs to run. Still lost? Perhaps, you subscribe to events or updates from your favorite people or groups on Facebook or other social media platforms. When an event pops up in your notification list, you take action by either saying you will attend or that you can‘t make it. You can also choose to ignore the event and go about your day. That is, events that you subscribe to are triggers for you to take some sort of action. There are also thousands of other events about which you may not know or care. We all have our preferences, and computer programs can be set to have theirs. Setting those preferences is called subscribing to events. In this context, events are pieces of computer code that other computer programs can understand. Once the code is sent out, the programs that subscribe to that event pick it up. Once picked up, the waiting program is triggered to follow whatever instructions it has in its code. A retail-specific example could be that LS Nav sends out an event from the sales module of the program. The finance module has been set to subscribe to that event, so it activates and records the sale. As this example shows, even different modules, or bits of code, within the same program can be set to subscribe and react to events.\


Now that we understand events, the next term to define is extensions. The programs, apps, and add-ons that are waiting for the events are types of extensions. They all take the core program and extend its functionality in some way that fits with the specific needs of the user. An extension could be something as simple as an automatic email being sent out to customers in a loyalty program when new products or promotions are available. An extension can also be something as large as a complete module on top of Dynamics NAV and LS Nav. Let’s look at another analogy. You work hard and finally have a break, so you are booking a vacation at your favorite resort. You don’t want the all-inclusive option but like to tailor your vacations to fit exactly your needs. You book a room, but then are offered an upgrade to a suite. You decide to take the suite. In that, you have extended your base vacation package to your tastes. Maybe you go on to book a table at a local restaurant or tickets to concert taking place at the resort. Each offer of an upgrade can be thought of as an event. The events that you say yes to trigger extensions of room upgrades, table bookings, and concert tickets just for you.

Simplifying upgrades

Technology can also be tailored to a user’s specifications, and extensions built off events make it easy to do because they keep the customization separate from the core of LS Nav – and Dynamics NAV. To extend the vacation analogy, if upgrading to a suite required the hotel to break down the wall of the original room to make it larger just for you and you had to pay for the renovations, the resort would be much less likely to offer that extension, and you would be much less likely to order it. That may seem like a stretch, but that is how many customizations and extensions were done in Microsoft Dynamics NAV in the past. A developer would have to enter the core code of the program and insert its code directly into the core. Now, events allow subscribed programs to follow what happens as a result of the core program, or other add ons, and to react as needed. If, in the past, Microsoft changed the core code of Dynamics NAV, then all the code used to create customizations would have to be reinserted into the new core code, a lengthy and expensive process. Thanks to events and extensions, the solutions become more modular and independent, allowing them to keep functioning even with major changes in the code that makes up the core of Dynamics NAV as long as the events stay the same. Even more powerful, extensions can be upgraded independently of the core code, giving users and developers increased control over their technology.

Quicker, safer, cheaper

Breaking extensions out of the core code via events addresses three concerns LS Nav users have had about upgrading their systems – the time upgrades took, the risk, and the cost. Some LS Nav users hold on to older versions of the program because of the time and man-power needed for upgrading. With events and extensions, a user can have the most up-to-date system almost automatically, especially with the use of automated testing. That means that users can take advantage of newer, industry-specific technologies, such as mobile POS systems, much sooner and without a major time and money investment in upgrading. Finally, the extensions are independent of the core code, meaning that the chance of glitches when upgrading are reduced.   This relatively simple change in how LS Nav functions means a big change in the ease of upgrades and customization for our users. If you want to know how events and extensions in LS Nav can help you reduce the time, risks, and cost of upgrading, or have technical questions about the technology, contact our experts today!