Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Break line in the caption of the field or extend the caption length

(0) ShareShare
ReportReport
Posted on by 295

My text of caption is very long. I want the caption of field can have break line or it can show long text.

I tried many ways but not succeeded:

It still showed a part of the text.

pastedimage1678258587012v1.png

layout
{

addbefore(General)
{
group(Note)
{
Caption = 'Note';
// Visible = bAllowReleasePO;
ShowCaption = false;
grid(Grid1)
{

field(Notify; Rec.Notify)
{

ApplicationArea = all;
ToolTip = 'AAA - Only for showing message';
CaptionClass = Format(tNotification);
ColumnSpan = 3;
Editable = false;


}
}

}
}

}

actions
{

modify(Release)
{
Enabled = bAllowReleasePO;

}
modify(Reopen)
{
Enabled = bAllowReOpenPO;

}


}
trigger OnOpenPage()
var
lRec_UserSetup: Record "User Setup";
begin
// CurrPage.Editable(false);
tNotification := 'You can\ \n 11111111111111111111111111111111111111' + FORMAT(10) + FORMAT(13) + '11111111111111111111111 1111111111111111111 1111111111111111111 11111111111';
if lRec_UserSetup.get(UserId) then;
if lRec_UserSetup."AAA Allow Release PO" then begin
bAllowReleasePO := true;
tNotification := tNotification + ' Release';
end else begin
bAllowReleasePO := false;
tNotification := tNotification + ' NOT Release';
end;
if lRec_UserSetup."AAA Allow Reopen PO" then begin
bAllowReOpenPO := true;
tNotification := tNotification + '; can ReOpen';
end else begin
bAllowReOpenPO := false;
tNotification := tNotification + '; can NOT ReOpen';
end;

end;

var
bAllowReleasePO: Boolean;
bAllowReOpenPO: Boolean;
tNotification: Text;
ApprovalEntry: Record "Approval Entry";

ApproveTitle: Text[250];
Entryno: Integer;
Entrynostr: Text[250];

How to insert break line to caption or set the caption length to maximum of a group ?

  • Verified answer
    Hoang Ng Profile Picture
    Hoang Ng 295 on at
    RE: Break line in the caption of the field or extend the caption length

    Hi Haider,

    I misunderstood you.

    When I used Label instead of Field. It worked.

    Thank you so much.

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 232 on at
    RE: Break line in the caption of the field or extend the caption length

    Hi Peter,

    I have replicated example that is similar to your need.

    pageextension 50100 MyExtension extends "Customer Card"
    {
    
        layout
        {
            addafter(General)
            {
                group(LabelTest)
                {
                    ShowCaption = false;
                    Label(LabelVal)
                    {
                        ApplicationArea = All;
                        MultiLine = true;
                        CaptionClass = Format(tNotification);
                    }
                    field("Global Dimension 1 Filter"; Rec."Global Dimension 1 Filter")
                    {
                        ApplicationArea = All;
                        Caption = '';
                    }
                }
    
            }
    
    
        }
        trigger OnOpenPage()
        begin
            tNotification := 'You can\ \n 11111111111111111111111111111111111111'   FORMAT(10)   FORMAT(13)   '11111111111111111111111 1111111111111111111 1111111111111111111 11111111111';
        end;
    
        var
            tNotification: Text;
    }

    And Result

    pastedimage1678269739368v1.png

  • Hoang Ng Profile Picture
    Hoang Ng 295 on at
    RE: Break line in the caption of the field or extend the caption length

    Thanks Haider.

    I tried to add as your instruction but it does not work

    MultiLine = true;

    It seems working for inside Text Field not for it's caption.

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 232 on at
    RE: Break line in the caption of the field or extend the caption length

    Please add MultiLine Property to True in page field.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,403 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans