Hi. How can I change dynamically color of rows on the list page?
The color depends of global variable. I assigned color (variable) to each record in OnAfterGetRecord trigger - this part works correctly.
After Modify record I need to update color of modified row. I try to do this in OnModifyRecord trigger but it does not work. If I add CurrPage.Update() method - I get memory error on the page in BC.
field("Quantity"; Rec."Quantity")
{
ApplicationArea = Manufacturing;
StyleExpr = Color;
}
trigger OnAfterGetRecord()
begin
if Rec."Quantity" < Rec."Total Qty." then
Color := 'attention'
else
Color := 'standard';
end;
This part does not work:
trigger OnModifyRecord(): Boolean
begin
if Rec."Quantity" < Rec."Total Qty." then
Color := 'attention'
else
Color := 'standard';
end;