web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    25,078 Most Valuable Professional on at
    Sales order add custom Line field amount in Total Incl. VAT (USD)
    Hi
    I hope this can help you and give you some hints
    BR
    GR
  • Suggested answer
    YUN ZHU Profile Picture
    95,307 Super User 2025 Season 2 on at
    Sales order add custom Line field amount in Total Incl. VAT (USD)
    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
    Sales order add custom Line field amount in Total Incl. VAT (USD)
    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
    Sales order add custom Line field amount in Total Incl. VAT (USD)
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans