Highlighting your field can be a very helpful for your user. For example, overdue invoices are colored in red, so users can quickly recognize and pay more attention on those invoices.
Business Central offers a way to highlight these fields using Style property. Though limited in style selection, it is still pretty powerful tool to use.
field(Description; Rec.Description)
{
ApplicationArea = All;
Style = Attention;
}
If you want to change style based on condition, you can assign a text variable to the StyleExpr property. You can then use trigger to set up the text variable.
field(Description; Rec.Description)
{
ApplicationArea = All;
StyleExpr = StyleExprTxt;
}
trigger OnAfterGetRecord()
begin
If Rec."Due Date" < WorkDate() then
StyleExprTxt := 'Unfavorable'
else
StyleExprTxt := '';
end;
var
StyleExprTxt : Text;
Make sure to use the right color. The right choice of color can support better readability of the information. The wrong choice of color can make it less readable and convey different messages. You don’t want to use grey color for overdue invoices.
Below is the list of style in Business Central.
Value | Description |
---|---|
None | None |
Standard | Standard |
StandardAccent | Blue |
Strong | Bold |
StrongAccent | Blue + Bold |
Attention | Red + Italic |
AttentionAccent | Blue + Italic |
Favorable | Bold + Green |
Unfavorable | Bold + Italic + Red |
Ambiguous | Yellow |
Subordinate | Grey |
Below is how it looks like in BC.
*This post is locked for comments