We have an add-on for Dynamics NAV 2016 in which we have customisations in codeunit 1. Withveventing, we can create a codeunit with event subscribers and move our customisations to those functions in order to keep codeunit 1 standard and unmodified. great so far.
But, our add-on is also incorporated by partners in their solution and deployed by their customers who do not always have a license for our add-on. In previous versions, we had a license check function in codeunit 1 to trigger whether or not our codeunits may be called. But with eventing, we can not do this anymore because the event subscribers are called automatically upon starting the RTC client.
So, this results in an error if our codeunit is not within the license range of the customer!
So my question is: Is there a way to have a codeunit with event subscribers and only get it triggered when it is in the license range?
0
Answers
Did you set the "OnMissingLicense" option to "Skip"for the subscribing function?
See: https://msdn.microsoft.com/en-us/library/mt574377(v=nav.90).aspx