Table Object Triggers Overview in D365 BC:
(1) In this blog, we will get to know about the number and use of triggers in the object Table. For new table Creation refer to this link “Creation Of Table In Microsoft Dynamics 365 BC“.
(2) In the Object Table, there are four triggers, as shown below:
(a) OnInsert()– This trigger calls when a new record is entered in the table. There are two ways to call this trigger as shown below:
- Enter the information via the User Interface.
- Enter the information via AL (Syntax is Rec.Insert(True)).
- INSERT and INSERT(TRUE) in D365 BC.
(b) OnModify()– This trigger calls when a new record is entered in the table. There are two ways to call this trigger as shown below:
- Enter the information via the User Interface.
- Enter the information via AL (Syntax is Rec.Modify(True)).
- MODIFY and MODIFYALL in D365 BC.
(c) OnDelete()– This trigger calls when a new record is entered in the table. There are two ways to call this trigger as shown below:
- Enter the information via the User Interface.
- Enter the information via AL (Syntax is Rec.Delete(True)).
- DELETE and DELETEALL in D365 BC.
(d) OnRename()– This trigger calls when a new record is entered in the table. There are two ways to call this trigger as shown below:
- Enter the information via the User Interface.
- Enter the information via AL (Syntax is Rec.Rename(True)).
- Rename or Change the value of the Primary Key in BC D365.