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...
Suggested answer

creating sales order not updating totals

(0) ShareShare
ReportReport
Posted on by 70

i made custom made sales quote but when i click create order everything works but totals are not updating the way they should and they stay 0

any suggestions? it seems that they are calculated fields

  • samerabd Profile Picture
    70 on at
    RE: creating sales order not updating totals

    i fixed it by using RedistributeTotalsOnAfterValidate()  on  trigger OnAfterGetCurrRecord() and it works very well

  • Terrance Morgan Profile Picture
    515 on at
    RE: creating sales order not updating totals

    Updating tax amount in the sales order field is not a good idea. CuryTaxTotal field in sales order is calculated field. It is calculated from SOTaxTran lines. So, in order to update tax amount in sales order you actually need to insert SOTaxTran lines into Taxes view of the SOOrderEntry graph.

    Something like that:

    //indicate that taxes are inserted in manual mode

    TaxAttribute.SetTaxCalc<SOLine.taxCategoryID>(graph.Transactions.Cache, null, TaxCalc.ManualCalc);

    // insert SOTaxTran

    SOTaxTran newTaxTran= new SOTaxTran();

    newTaxTran.TaxRate = 0.1; //put your actual values here

    newTaxTran.CuryTaxableAmt = 100; //put your actual values here

    newTaxTran.CuryTaxAmt = 10; //put your actual values here

    var taxTran = graph.Taxes.Insert(newTaxTran);

    --

    Terrance

    CRM Admin | Apps4Rent

  • samerabd Profile Picture
    70 on at
    RE: creating sales order not updating totals

    i solved this but i had to add a button and call a local procedure called redistribute totals but it doesn't work if you have not open the page already and added the records like when i create a sales order, i'll check what you suggested

  • Suggested answer
    THE Italian Profile Picture
    on at
    RE: creating sales order not updating totals

    You should check the property update propagation and mimic exactly what the other documents (sales quote / order) does in the standard.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 691

#2
YUN ZHU Profile Picture

YUN ZHU 646 Super User 2025 Season 1

#3
Mansi Soni Profile Picture

Mansi Soni 495

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans