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

Handling .Net events in C/AL

.NET components embedded in a NAV object can communicate with their host object by means of events that are handled by C/AL code. Events are raised by .NET components that invoke event handlers in NAV.

How to do it...

The FileSystemWatcher component will be used to illustrate .NET events handling in C/SIDE. The component monitors changes in the filesystem and raises events in response to any file modification. These events will handled by a NAV object.

  1. A new table will be required for the following demo to store data received from the FileSystemWatcher component. Open the table designer and create a table.
  2. Insert four fields in the table:

    Field No.

    Field Name

    Data Type

    Length

    1

    ID

    Integer

    2

    Path

    Text ...

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