On the Visual Studio Code platform, I have a fairly large Dynamics 365 Business Central Extension written in AL code. Microsoft is changing an AL code rule, which will cause widespread errors if not addressed before the next release. Because "implicit with" can no longer be used, every record reference in the code must now be qualified with "Rec." There will be several hundred places in this extension where this will need to be addressed, and it is simply not feasible to adjust them one by one. As an example,
This:
field(TradeNumber; TradeNumber)
{
ApplicationArea = All;
Caption = 'Trade No.';
Editable = False;
}
field(TradeType; TradeType)
{
ApplicationArea = All;
Caption = 'Trade Type';
}
Becomes this:
field(TradeNumber; Rec.TradeNumber)
{
ApplicationArea = All;
Caption = 'Trade No.';
Editable = False;
}
field(TradeType; Rec.TradeType)
{
ApplicationArea = All;
Caption = 'Trade Type';
}
So, if the error (or "problem" as it is now) is the same for these several hundred instances, is there a way to "bulk-correct" by simply appending "Rec." to the beginning of every reference that has been flagged across multiple files and folders?
Here's a link that may help you.
Top Visual Studio Code Extensions: 50 Tools, and Snippets (stackify.com)