In certain cases, warning LC0051 is show when there is now problem. When setting the filter on text fields that are bigger then the field itself should not give a problem. I tested this by setting the filter with a value bigger then 100 on the field and it didn't result in an error.
ImportLine."Contact Name" is Text[100];
local procedure FindExistingContacts()
var
Contact: Record Contact;
begin
Contact.SetFilter(Name, '%1', '@' + ImportLine."Contact Name"); //This gives warning because this would result in length 101.
Contact.findfirst();
end;
In certain cases, warning LC0051 is show when there is now problem. When setting the filter on text fields that are bigger then the field itself should not give a problem. I tested this by setting the filter with a value bigger then 100 on the field and it didn't result in an error.
ImportLine."Contact Name" is Text[100];