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

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to get actual tax amount for sales line?

(0) ShareShare
ReportReport
Posted on by 573

I have adjusted sales tax amount for a sales line. Which method is used to get the actual tax amount?

E.g. The sales tax amount for this sales line is calculated as 100. And I adjust the actual tax amount to 100.01.

Is there a simple method to get 100.01 as return value?

Thanks.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Catalyst619 Profile Picture
    355 on at
    Try something like the following (this referring to your salesLine):


    display TaxAmountCur saleslinewisetax(boolean _adjustTaxSign = true, boolean _includeUseTax = false) { SalesTotals salesTotals; TaxAmountCur taxAmountCur; salesTotals = SalesTotals::construct(this.salesTable()); salesTotals.calc(); salesTotals.tax().sourceSingleLine(true, true); taxAmountCur = salesTotals.tax().totalTaxAmountSingleLine(this.TableId, this.RecId, _adjustTaxSign, _includeUseTax); return taxAmountCur; }

    Does it return the 100 or the 100.01?

  • bernardqin Profile Picture
    573 on at

    Thanks Aleks. Unfortunately, it returns 100.

  • Suggested answer
    Andrew Xu Profile Picture
    3,877 on at

    How did you adjust the sales tax amount? The only way I'm aware of how to adjust sales tax amount is thru adjusting the tax rate of the tax code in item tax group.

  • Verified answer
    bernardqin Profile Picture
    573 on at

    Hi Aleks, thanks again. I use another method "totalRegulatedTaxAmountSingleLine" instead of "totalTaxAmountSingleLine", and it works well.

  • bernardqin Profile Picture
    573 on at

    Using standard AX function. Sales tab -> Tax

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans