Just want to know where the code was written to pick ledger account for Sales invoice journal posting

Hi All,

I just want to know how Ledger account has been taken while posting Sales Invoice … any class methods or table methods… since while posting sales invoice for Return order, it was not taking the ledger account for Sales Return and it was taking from Sales Revenue …



salesformletter_invoice is base class for posting the invoice , u need to bebug the issue and need to see where it is picking the ledger account,

take example of the ledgervoucher.addtrans method (keep debuger there) and see where it it balance the voucher and the u can find which ledger dimension iti spicking,

most probabaly if u find the ledger dimension(recid), u can find the account int dimensionattributevaluecombination table. > ledger accounts.

please also check the posting setups…

In Ax 2012


called from \Classes\SalesInvoiceJournalPost\postLine using \Classes\SalesFormletterProvider\ledgerDimensionLineAmount

In AX 2009


called from \Classes\SalesFormLetter_Invoice\updateNow using \Data Dictionary\Tables\SalesLine\Methods\accountSales

Hi Kranthi,

Thank you for your quick reply … Your ans helps me find what i want to change.

Dimension picking is from the same method from SalesFormletterProvider\ledgerDimensionLineAmount method which i reallly struggling find this method… Thank you very much…

Also thanks for SriKanth… Your reply also helped me :slight_smile: