Find all references now works on triggers, system methods, and trigger events

Important

This content is archived and is not being updated. For the latest documentation, go to What's new or changed in Business Central. For the latest release plans, go to Dynamics 365, Power Platform, and Cloud for Industry release plans.

Enabled for Public preview General availability
Admins, makers, marketers, or analysts, automatically Aug 13, 2023 Oct 2, 2023

Business value

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.

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:

Example of CodeLens count and Find all References used on Customer table OnInsert trigger

Tell us what you think

Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.