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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Link CustInvoiceLine table and TaxTrans Table

(0) ShareShare
ReportReport
Posted on by 435

Hi There,

I am Creating a report which bring Tax Amount for Free Text Invoices, but i cant find the relation in between CustInvoiceLine table and  TaxTrans Table.

Kindly help me to how to link the above tables

Thanks.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    You can check the method displayTaxAmount of table CustInvoiceLine to see how table custInvoiceTable & taxTrans are related and how tax is getting calculated. Below code provides you the required relationship.

    static void AXC_CustInvoiceTable(Args _args)
    {
        CustInvoiceTable custInvoiceTable;
        TaxTrans         taxTrans;    
        CustInvoiceTrans custInvoiceTrans;
        CustInvoiceLine  custInvoiceLine;
        
        while select  taxTrans
            join LineNum, InvoiceId, InvoiceDate, RecId from custInvoiceTrans
                where taxTrans.SourceRecId == custInvoiceTrans.RecId
                    && taxTrans.SourceTableId == custInvoiceTrans.TableId
            join custInvoiceLine
                where custInvoiceTrans.LineNum == custInvoiceLine.LineNum 
            join custInvoiceTable
                where custInvoiceTable.RecId  == custInvoiceLine.ParentRecId
                    && custInvoiceTrans.InvoiceId == custInvoiceTable.InvoiceId
                    && custInvoiceTrans.InvoiceDate == custInvoiceTable.InvoiceDate
        {
            info(strFmt("InvoiceId: %1, TaxCode: %2", custInvoiceTable.InvoiceId, taxTrans.TaxCode));
        }
    }

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans