D365 Business Central : Style Color

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.

thatnavguy

Experienced NZ-based NAV Developer and Consultant with 15+ years of experience leading multiple IT projects, performing business analyst, developing, implementing, and upgrading Dynamics NAV and Business Central. Passionate to deliver solution that focuses on user-friendly interface while keeping high standard of compliance with the needs.

You may also like...

2 Responses

  1. 18 November 2021

    […] Style Color […]

Leave a Reply

Your email address will not be published. Required fields are marked *