Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Unable to customize "Sales Line FactBox" to add custom fields

Posted on by 10

Hi All,

I am new to AL programming. I am trying to customize "Sales Line FactBox" to add some custom fields. I have added the following code to extend the factbox. But the code is not making any change to the factbox. Please suggest what I am doing wrong. Thanks in advance.

pageextension 50101 SalesLinesProCoFields extends "Sales Line FactBox"
{
    layout
    {
        // Add changes to page layout here
        addafter(Item)
        {
            group("Proco Fields")
            {
                field("Order Id"; Rec.P_Ord_Id) { }
                field("Buy Price"; Rec.P_BuyPrice) { }
                field("Cust Inv No"; Rec.P_CustInvNo) { }
                field("Line No"; Rec.P_LineNo) { }
                field("Supplier Acc No"; Rec.P_SprAccNo) { }
                field("Class"; Rec.P_Cls) { }
            }
        }
    }

}
  • S. Singh Profile Picture
    S. Singh 10 on at
    RE: Unable to customize "Sales Line FactBox" to add custom fields

    Thanks for your quick reply. It solved my problem. Thanks

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 20,995 Moderator on at
    RE: Unable to customize "Sales Line FactBox" to add custom fields

    Hi,

    Try this if it works for you.

    pageextension 50101 SalesLinesProCoFields extends "Sales Line FactBox"
    {
        layout
        {
            // Add changes to page layout here
            addafter(Item)
            {
                group("Proco Fields")
                {
                    field("Order Id"; Rec.P_Ord_Id) { applicationarea = all;}
                    field("Buy Price"; Rec.P_BuyPrice) {applicationarea = all; }
                    field("Cust Inv No"; Rec.P_CustInvNo) { applicationarea = all;}
                    field("Line No"; Rec.P_LineNo) { applicationarea = all;}
                    field("Supplier Acc No"; Rec.P_SprAccNo) { applicationarea = all;}
                    field("Class"; Rec.P_Cls) { applicationarea = all;}
                }
            }
        }
    
    }

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans