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 GP (Archived)

SalesLineTax is not inserted

(1) ShareShare
ReportReport
Posted on by

I'm trying to insert taxes on line item level by using Taxes array on SalesInvoiceLine object. However, when I check it through the interface, taxes are not applied at all. I tried to enter a salesinvoice through the interface and add taxes to line items to make sure that it is not related to a setting. Any help would be appreciated. My code is as follows:

                var tax = new SalesLineTax();

                tax.Key = new SalesLineTaxKey();
                tax.Key.SalesLineKey = new SalesLineKey();

                tax.Key.SalesLineKey.SalesDocumentKey = new SalesDocumentKey();
                tax.Key.SalesLineKey.SalesDocumentKey.Id = invoiceKey;

                tax.Key.TaxDetailKey = new TaxDetailKey();
                tax.Key.TaxDetailKey.Id = "SOMEKEY";

                tax.TaxableAmount = new MoneyAmount();
                tax.TaxableAmount.Currency = "USD";
                tax.TaxableAmount.DecimalDigits = 2;
                tax.TaxableAmount.Value = 94.75m;

                tax.TotalAmount = new MoneyAmount();
                tax.TotalAmount.Currency = "USD";
                tax.TotalAmount.DecimalDigits = 2;
                tax.TotalAmount.Value = 94.75m;

                tax.TaxAmount = new MoneyAmount();
                tax.TaxAmount.Currency = "USD";
                tax.TaxAmount.DecimalDigits = 2;
                tax.TaxAmount.Value = 6.15m;

                salesInvoiceLine.Taxes = new SalesLineTax[] { tax };




*This post is locked for comments

I have the same question (0)

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 GP (Archived)

#1
HP-11021721-0 Profile Picture

HP-11021721-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans