Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

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

Posted on by 221
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 
Categories:
  • DineshM Profile Picture
    DineshM 221 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;
    }

     
  • DineshM Profile Picture
    DineshM 221 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
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 62,281 Super User 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
     
     
  • gdrenteria Profile Picture
    gdrenteria 3,888 Super User 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

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,676 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,910 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans