O'Reilly logo

Extending Microsoft Dynamics NAV 2016 Cookbook by Alexander Drogin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating custom events

The capabilities of custom application code are not limited by event subscription. Customized objects can raise predefined business or integration events, and publish new custom events.

How to do it...

The following recipe explains how to create a new event in codeunit 21 Item Jnl.-Check Line. that will fire on journal line verification, before any other line validation code.

  1. In the NAV development environment, select the codeunit 21 Item Jnl.-Check Line and click the Design button to access its C/AL code.
  2. Open the C/AL Globals window, tab to Functions and insert a new function in the list - OnBeforeCheckItemJnlLine.
  3. Click the Locals button located in the right panel. This will open the list of function parameters. Add one parameter: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required