Hi,
Dynamics BC variable names are not case sensitive.
E.g. you can declare a variable with name of "PurchLine", and you can refer to this variable when coding with "pUrChLiNe".
e.g.
field("Date Filter"; DateFilter)
{
ApplicationArea = All;
Description = 'Specify Date Filter';
trigger OnValidate()
var
>> DateRec: record "Date";
begin
>> daterec.setfilter("Period Start", DateFilter);
datefilter := daterec.getfilter("Period Start");
end;
}
DateRec in snippet above is not in correct case, but VS Code still accepts this. But is there anyway for VS Code to autofix the variable names? so that the case is as per what is declared in the variable?
I know it's probably not important as the code compiles and runs anyway, but my inner OCD is bugging me.
Answers
Dirty trick could be to do F2 on the variable name, change it to something else and then back to the proper case. Copy DateRec to clipboard, F2 and change it to 'dummy', F2 and paste DateRec, should be fixed.
To satisfy your OCD, you should develop a habit of never typing in the wrong case. Use IntelliSense. In this function you could type 'dr' and that should dropdown IntelliSense and then you can pick the right variable name.
RIS Plus, LLC
RIS Plus, LLC