web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Sales order add custom Line field amount in Total Incl. VAT (USD)

(1) ShareShare
ReportReport
Posted on by 238
Dear all,
I have one Field in Sales Line In Sales Order as Due Amount .When User Enter Value In field In multiple Items It should add in Total Incl. VAT (USD) also in statistic in Total Incl. VAT (USD) can you Please Tellme how to Achive same I have not find Field In Sales Header table .
Please Refer SS 
  • Gerardo Rentería García Profile Picture
    27,623 Super User 2026 Season 2 on at
    Hi
    I hope this can help you and give you some hints
    BR
    GR
  • Suggested answer
    YUN ZHU Profile Picture
    103,829 Super User 2026 Season 2 on at
    Hi, hope the following helps.
    Dynamics 365 Business Central: How to add new fields to Total Area on the Document Subform page (View Total Quantity, Number of Lines on the Sales Order)
     
    Or
    Dynamics 365 Business Central: How to add Total Quantity, Number of Lines to the Sales Order List page – Customization
     
    Thanks.
    ZHU
     
     
  • DineshM Profile Picture
    238 on at
    Thank you For your quick response.
    I had taken Reference links which Shared but I am not getting How to add Sales Line Custom Field Data (may be for 3 ,4 items) in Total amount including VAT 
    can you please help 
     
    Thanks
  • DineshM Profile Picture
    238 on at
    Hello 
    I have found one Workaround for Same
     
    created Field In Sales Line And Added Same In onaftergetRecord As Sum then added in Field 
    pageextension 50005 SalesOrderSubformExt extends "Sales Order Subform"
    {
        layout
        {
            addafter(Quantity)
            {
                field(Due; Due)
                {
                    ApplicationArea = all;
                }
            }
            modify("Total Amount Incl. VAT")
            {
                visible = false;
            }
            addafter("Total VAT Amount")
            {
                field("Total Amount Incl. VAT1"; TotalSalesLine."Amount Including VAT" + DueAmt)
                {
                    ApplicationArea = Basic, Suite;
                    AutoFormatExpression = Currency.Code;
                    AutoFormatType = 1;
                    CaptionClass = DocumentTotals.GetTotalInclVATCaption(Currency.Code);
                    Caption = 'Total Amount Incl. VAT';
                    Editable = false;
                    ToolTip = 'Specifies the sum of the value in the Line Amount Incl. VAT field on all lines in the document minus any discount amount in the Invoice Discount Amount field.';
                }
            }
     
        }
        trigger OnAfterGetRecord()
     
        begin
            Clear(DueAmt);
            SL.Reset();
            SL.SetRange(SL."Document No.", Rec."Document No.");
            if Sl.FindSet() then
                repeat
                    DueAmt := SL.Due;
                until SL.Next = 0;
        end;
     
        var
            SL: Record "Sales Line";
            DueAmt: Decimal;
    }

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 728 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 545 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 328 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans