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

Subscribing to global events

Global events are raised by codeunit 1 ApplicationManagement in response to certain application-wide actions, such as opening and closing the company or opening the user's default role center.

How to do it...

The following recipe will show how to subscribe to the global events OnCompanyOpen and OnCompanyClose to log user activities in each company. Event information will be stored in a separate table.

  1. Create a table in NAV table designer. Open the table properties window, from the View menu, select the Properties option, or press Shift + F4 . Update the value of the property DataPerCompany from the default value Yes to No.
  2. Create four fields, as shown in the following table:

    Field No.

    Field Name

    Data Type

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