LC0059 - StefanMaron/BusinessCentral.LinterCop GitHub Wiki
Single quote escaping issue detected.
This rule aims to help developers correctly apply an is not empty filter using the .SetFilter
operator.
Problem
Customer.SetFilter("Customer Posting Group", '<>''');
At some point, many AL developers attempt to set an is not empty filter as shown in the example above. Unfortunately, this approach does not produce the expected result.
Solution
Customer.SetFilter("Customer Posting Group", '<>%1', '');
Customer.SetFilter("Customer Posting Group", '<>''''');
Using %1
or ''''
for correct string escaping for the SetFilter method.