Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Adjust the size of a field displayed on a page - Work description

(0) ShareShare
ReportReport
Posted on by

Is there any way within AL or otherwise to adjust the size of a display box, for example, on the Purchase Invoice screen, I want to adjust the size of the Work Description field on the Sales Invoices screen?

pastedimage1680035856619v2.png

  • Suggested answer
    Greg Enns Profile Picture
    Greg Enns 1,102 on at
    RE: Adjust the size of a field displayed on a page - Work description

    Looks like Zhu has a good solution. One thing I would add... I have found that by moving/grouping other fields in the same area, you can usually cause a blob field to show more lines.

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    RE: Adjust the size of a field displayed on a page - Work description

    Hi, I just tested it briefly. If you create a Factbox to display Work Description, it can display 5 lines. . . . .

    pastedimage1680075610297v1.png

    Update: As long as Editable = false and ShowCaption = false, five lines can be displayed.

    pastedimage1680076960504v1.png

    My test code:

    pageextension 50111 ZYSalesOrderExt extends "Sales Order"
    {
        layout
        {
            addafter(Status)
            {
                field("Work Description 2"; WorkDescription)
                {
                    Editable = false;
                    ShowCaption = false;
                    ApplicationArea = All;
                    MultiLine = true;
                }
            }
            addfirst(factboxes)
            {
                part(SalesOrderWorkdescription; "Sales Order Work description")
                {
                    ApplicationArea = All;
                    SubPageLink = "Document Type" = FIELD("Document Type"), "No." = field("No.");
                }
            }
        }
    
        var
            WorkDescription: Text;
    
        trigger OnAfterGetRecord()
        begin
            WorkDescription := Rec.GetWorkDescription();
        end;
    }
    
    page 50111 "Sales Order Work description"
    {
        Caption = 'Sales Order Work description';
        PageType = CardPart;
        SourceTable = "Sales Header";
        InsertAllowed = false;
        Editable = false;
        DeleteAllowed = false;
    
        layout
        {
            area(Content)
            {
                field("Work Description"; WorkDescription)
                {
                    Caption = 'Work Description';
                    ShowCaption = false;
                    ApplicationArea = All;
                    MultiLine = true;
                }
            }
        }
    
        var
            WorkDescription: Text;
    
        trigger OnAfterGetRecord()
        begin
            WorkDescription := Rec.GetWorkDescription();
        end;
    }

    Hope this helps as well.

    Thanks.

    ZHU

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    RE: Adjust the size of a field displayed on a page - Work description

    Unfortunately as far as I know, this cannot be adjusted by default.

    In addition to the Java script that Bilal mentioned, you can also try WebPageViewer Add-in.
    More details: https://yzhums.com/16061/

    pastedimage1680050951793v1.png

    Hope this helps as well.

    Thanks.

    ZHU

  • kjjson Profile Picture
    kjjson on at
    RE: Adjust the size of a field displayed on a page - Work description

    Thank you, we are trying to increase the size of the field. Right now it shows 3 lines, we would like to change it to 6 lines.

  • Bilal Haider Profile Picture
    Bilal Haider 47 on at
    RE: Adjust the size of a field displayed on a page - Work description

    Hi,

    Yes there is limited options for adjustments within AL (more options using Java script). Can you elaborate what adjustment exactly you need for Work description.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans