This post is part of the New Functionality In Microsoft Dynamics 365 Business Central 2023 Wave 2 series in which I am taking a look at the new functionality introduced in Microsoft Dynamics 365 Business Central 2023 Wave 2.
The seventh of the new functionality in the Development section is Find all references now works on triggers, system methods, and trigger events.
The CodeLens for Where used reference counts and the Find all References tool in Visual Studio Code has not supported triggers, system methods, or trigger events, making it much harder for users to understand and navigate. With Business Central 2023 release wave 2 we are adding support for this, making developers more productive.
Enabled for: Admins, makers, marketers, or analysts, automatically
Public Preview: Aug 2023
General Availability: Oct 2023
Feature Details
We are now finding only relevant references to built-in methods. As an example, Shift+F12 on the Customer.Insert
method will now only give you Insert references on the customer record, whereas before you would get any Insert
on any record.
We also support finding references to triggers/events/built-in methods that are relevant. For instance, we are finding:
- References to triggers in event subscribers and vice versa (ex: Table.OnInsert <-> OnAfterInsertEvent)
- References to triggers in other triggers and vice versa (ex: Table.OnInsert <-> TableExt.OnBeforeInsert)
- References to triggers in procedures and vice versa (ex: Table.OnInsert <-> Rec.Insert)
- References to procedures or events in event subscribers and vice versa (ex: Table.OnInsert <-> OnAfterInsertEvent)
In this release, the above is enabled on page fields, table fields, page actions, and table methods/triggers/events.
This illustration shows an example of the CodeLens count (the grey "17 references" at the top) and Find all References used on the Customer table trigger OnInsert: