The public preview for Dynamics 365 Business Central 2023 release wave 2 (BC23) is available. Learn more: Link.
I will continue to test and share some new features that I hope will be helpful.
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.
You can use the Find All References command to find where particular code elements are referenced throughout your codebase. The Find All References command is available on the context (right-click) menu of the element you want to find references to.
Or, if you’re a keyboard user, press Shift + F12.
With this wave, Microsoft 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)
For exmaple, Customer.Insert
Find All References:
Or, press Shift + F12.
In this release, the above is enabled on page fields, table fields, page actions, and table methods/triggers/events.
Please note that this find range is only for the currently opened project, and cannot find a reference to standard objects.
Very nice improvement. Give it a try!!!😁
Hope this will help.
Thanks for reading.