Inevitably when designing an application you will need to handle data requests in NAV. This document has provided examples of NAV code where required. Typically the code will be contained in an Extension Codeunit. To start with you should export codeunit 23044539 (WMDM Extension Template) and renumber to something in your available range (e.g. 50000+). For new applications you will be using the “onBeforeProcessEvent” and all of your event ID’s should be in the 2 million range to avoid licensing issues. Example:
Note: For more information on extension codeunits reference the support portal or contact product support.