Skip to main content

Notifications

Announcements

No record found.

Style Color

TeddyH Profile Picture TeddyH 12,868 Super User 2024 Season 1

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.

ValueDescription
NoneNone
StandardStandard
StandardAccentBlue
StrongBold
StrongAccentBlue + Bold
AttentionRed + Italic
AttentionAccentBlue + Italic
FavorableBold + Green
UnfavorableBold + Italic + Red
AmbiguousYellow
SubordinateGrey

Below is how it looks like in BC.


This was originally posted here.

Comments

*This post is locked for comments