Book Image

Microsoft Dynamics NAV Development Quick Start Guide

By : Alexander Drogin
Book Image

Microsoft Dynamics NAV Development Quick Start Guide

By: Alexander Drogin

Overview of this book

Microsoft Dynamics NAV is an enterprise resource planning (ERP) software suite for organizations. The system offers specialized functionality for manufacturing, distribution, government, retail, and other industries. This book gets you started with its integrated development environment for solving problems by customizing business processes. This book introduces the NAV development environment – C/SIDE. It gives an overview of the internal system language and the most essential development tools. The book will enable the reader to customize and extend NAV functionality with C/AL code, design a user interface through pages, create role centers, and build advanced reports in Microsoft Visual Studio. By the end of the book, you will have learned how to extend the NAV data model, how to write and debug custom code, and how to exchange data with external applications.
Table of Contents (10 chapters)

Table triggers

A table trigger is a C/AL function that is called by the NAV platform in response to certain events in the table, such as inserting or modifying a record, or entering a value in a table field. The key difference between a common C/AL function and a table trigger is that the latter cannot be called explicitly in application code; it is either initiated by user actions or called implicitly when other C/AL functions perform data manipulations on the table.

Then, we will implement several examples of table triggers bound to different actions on a table. The first example is the OnDelete trigger, invoked when a table record is being deleted. This trigger will delete all contract lines when the contract is deleted.

Open the 50500 Lease Contract Header table, in table designer and find the OnDelete trigger declaration. It has already been generated by the designer, so...