Business Central 2022 wave 2 (BC21) new features: Verbose fields on bricks (New text line when view is Tiles or Tall tiles)

Dynamics 365 Business Central

Hi, Readers.
The preview environment for Dynamics 365 Business Central 2022 release wave 2 (BC21) is available. Learn more: Link.

I will continue to test and share some new features that I hope will be helpful.

Today I would like to share a new feature from Mike that I saw yesterday on MS Yammer.

VerBose fields (Registration required)

Bricks (sometimes called Tiles) are record summaries that are useful on the Web client, but essential on phone and tablet form factors. Sometimes, a record is best summarized by a descriptive text. BC now supports bricks with verbose text fields.

https://www.yammer.com/dynamicsnavdev/threads/1934753310007296

More details:

The demo page given by Microsoft is Banking Apps (20353, List)
More details: Easily find apps to connect to core services (easily discover and install third-party apps)

Bricks with verbose strings now show up 3 lines of text:

Well, so how can we add this VerBose fields? MS Learn (Docs) has not been updated yet, the only clue is the following info. But this left me with no way to get started.😑

Triggers automactically when lesser brick fields are defined as long texts

Then I checked the standard source code, one comment caught my attention.

LanguageCode is a placeholder to move “Short Description” on a new line in the page when view is Tiles or ‘Tall tiles’

Is it the fourth field in Brick that will be displayed as verbose strings?

I did a simple test. Created a simple table and page.

When no Fieldgroup (Brick) is added, the short description is displayed in the tile along with the other fields.

Then I added Fieldgroup (Brick) and added the Short Description field to the fourth position.

Let’s try again.

Bingo!!!😁

The next question is, can we modify the standard pages?
As you might know, in a table extension object, the fieldgroups control allows you to add more fields to a field group defined for the table object. This can be done by using the addlast(; ) keyword.

The keyword AddLast inserts a field into a field group.

Yes, we only have the addlast keyword, no addafter……

More details:
Add fields for a drop-down control
How to Customize Drop-Down List (Field Groups)

So, I think it is not possible to add verbose strings to a standard table that already has more than 4 fields in the Fieldgroup (Brick).
For example, table 18 Customer

But for tables that don’t have four fields in Fieldgroup (Brick), we should be able to append. Let me do another test.
table 3 “Payment Terms”

Adding a new Text field and add it to Fieldgroup (Brick).

Yes, this worked well.

Give it a try!!!😁

Test Source Code:
For custom table and page:

table 50100 "Lab Book"
{
    DataClassification = CustomerContent;

    fields
    {
        field(1; "No."; Code[10])
        {
            Caption = 'No.';
            DataClassification = CustomerContent;
        }
        field(2; Title; Text[30])
        {
            Caption = 'Title';
            DataClassification = CustomerContent;
        }
        field(3; Author; Text[30])
        {
            Caption = 'Author';
            DataClassification = CustomerContent;
        }
        field(4; Hardcover; Boolean)
        {
            Caption = 'Hardcover';
            DataClassification = CustomerContent;
        }
        field(5; "Page Count"; Integer)
        {
            Caption = 'Page Count';
            DataClassification = CustomerContent;
        }
        field(6; "Short Description"; Text[250])
        {
            Caption = 'Short Description';
            DataClassification = CustomerContent;
        }
    }

    keys
    {
        key(PK; "No.")
        {
            Clustered = true;
        }
    }

    fieldgroups
    {
        fieldgroup(Brick; "No.", Title, Author, "Short Description")
        {
        }
    }
}

page 50101 "Lab Book List"
{
    PageType = List;
    UsageCategory = Lists;
    ApplicationArea = All;
    SourceTable = "Lab Book";
    Caption = 'Book List';

    layout
    {
        area(Content)
        {
            repeater(Group)
            {
                field("No."; Rec."No.")
                {
                }
                field(Title; Rec.Title)
                {
                }
                field(Author; Rec.Author)
                {
                }
                field(Hardcover; Rec.Hardcover)
                {
                }
                field("Short Description"; Rec."Short Description")
                {
                }
                field("Page Count"; Rec."Page Count")
                {
                }
            }
        }
    }
}

For standard table (“Payment Terms”):

tableextension 50111 MyExtension extends "Payment Terms"
{
    fields
    {
        field(50100; NewDescription; Text[250])
        {
            DataClassification = CustomerContent;
        }
    }

    fieldgroups
    {
        addlast(Brick; NewDescription)
        {
        }
    }
}

pageextension 50115 MyExtension extends "Payment Terms"
{
    layout
    {
        addafter(Description)
        {
            field(NewDescription; Rec.NewDescription)
            {
                ApplicationArea = All;
            }
        }
    }
}

Update from Business Central Launch Event (2022 release wave 2) 

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL