Dynamics 365 Business Central: How to display/add Work Description (Blob Data type) on the list

Dynamics 365 Business Central

Hi, Readers.
Today I would like to talk about a question I saw this morning in the Business Central forums, how to display Work Description (Blob Data type) on the list.
Work Description field is a BLOB Data Type field, which usually contain multiline text. For example, on the Sales Order page:

table 36 “Sales Header”:

We have discussed some topics about Work Description before:

By default, this field is only displayed in Sales Order (42, Document) but not in Sales Order List (9305, List).

Why? Because BLOB Data Type cannot be displayed directly on the page, in Sales Order (42, Document), the standard is to use a Text data type variable to display its value.

Since this is processed every time the page is opened (OnAfterGetRecord trigger), displaying it in the list will affect performance.
However, if you don’t have many orders, it is worth considering.

As for how to do it, it’s not difficult. Let’s look at a simple example.

If you think it affects the layout of the list, you can set MultiLine Property to false.
PS: Dynamics 365 Business Central: Change the column width and row height in list pages

Source code:

pageextension 50120 SalesOrderListExt extends "Sales Order List"
{
    layout
    {
        addafter("Sell-to Customer Name")
        {
            field(WorkDescription; WorkDescription)
            {
                Caption = 'Work Description';
                ApplicationArea = Basic, Suite;
                Importance = Additional;
                MultiLine = true;
                ToolTip = 'Specifies the products or service being offered.';
            }
        }
    }

    var
        WorkDescription: Text;

    trigger OnAfterGetRecord()
    begin
        WorkDescription := Rec.GetWorkDescription();
    end;
}

Test video:

Very simple, give it a try!!!😁

PS:
1. Dynamics 365 Business Central: Conversion between Blob data type and Media/MediaSet data type

2. Dynamics 365 Business Central: How to show/display picture thumbnails on the list page

END

Hope this will help.

Thanks for your reading.

ZHU

コメント

Copied title and URL