- Mastering Microsoft Dynamics NAV 2016
- Rabindra Sah
- 299字
- 2021-07-09 19:20:02
Triggers
In Computer Science, a trigger is a method that commences an action when an event which is related to it occurs. In general, the events resemble key-press events, mouse events, and automatic events from a timer. But here, we are dealing with events that are directly or indirectly relevant to the database fetch or push operations like insert, delete, modify, and so on. There are the following three kinds of triggers in Microsoft Dynamics NAV:
- Documentation triggers
- Event triggers
- Function triggers
Documentation triggers
These are actually not triggers; these are used to write documentation for a particular object. Many developers use this space to document their modifications to standard objects. Every object has a documentation trigger. The code written in this trigger is eliminated in the section of code optimization of the compiler, and no code written in this section actually runs:
Event triggers
Event triggers are the most commonly used triggers. These triggers take action when any events are set. They always start with the word On
, such as OnRUN
, OnInsert
, OnDelete
, and the like. We can write code in all of the triggers. For event triggers, the code runs when the event related to it occurs. For example, the code in the OnRun
event trigger is executed when a codeunit that contains the trigger is run. Other examples are shown in the following screenshot:
Function triggers
Function triggers are the triggers which are created automatically when the function is defined in the C/AL Global window. The C/AL code can be written in the Trigger
section, and is executed when the function is called.
The following triggers are available for different objects in Microsoft Dynamics NAV 2016:
- Report and data item triggers
- Table and field triggers
- XMLport triggers
- Page and action triggers
- Codeunit triggers
- Query triggers
- Mastering Microsoft Forefront UAG 2010 Customization
- 審計全流程技術操作實務指南
- 資本的眼睛
- Magento 2 Cookbook
- 企業能源審計與節能規劃
- EViews10.0的應用與計量分析
- SAP ABAP Advanced Cookbook
- 大數據搜索與挖掘及可視化管理方案 :Elastic Stack 5:Elasticsearch、Logstash、Kibana、X-Pack、Beats (第3版)
- 陜西國家統計調查專題研究集萃(2006—2015)
- 財務建模與綜合估值:數據研磨、模型校準、動態估值
- 中國政府統計問題研究
- Microsoft Dynamics NAV
- Stata統計分析與行業應用案例詳解(第2版)
- Big Data Analytics with R and Hadoop
- Building Dashboards with Microsoft Dynamics GP 2016(Second Edition)