FlowFilter field assignment (PC0012)
FlowFilter fields should not be assigned values directly. They are meant to be set using SetFilter or SetRange to filter the calculated FlowField values. Direct assignment has no effect and indicates a misunderstanding of the FlowFilter concept.
Example
The following code incorrectly assigns a value to a FlowFilter:
codeunit 50100 MyCodeunit
{
procedure SetDateFilter()
var
Customer: Record Customer;
begin
Customer."Date Filter" := WorkDate(); // FlowFilter field assignment [PC0012]
end;
}
To fix this, use SetRange or SetFilter:
codeunit 50100 MyCodeunit
{
procedure SetDateFilter()
var
Customer: Record Customer;
begin
Customer.SetRange("Date Filter", 0D, WorkDate());
end;
}