Quantcast
Viewing all articles
Browse latest Browse all 73760

What is the link between MainAccount table and InventTrans table in AX 2012?

Hi all,

 

I am facing one issue in relation in AX 2012

I need to fetch MainaccountID from MainAccount and related Qty from InventTrans.. and related customer name from sales line.

so write one query...

 

 

 

 

while select * from salesline join inventtransorigin where salesline.InventTransId == inventtransorigin.InventTransId join inventtrans where  inventtransorigin.RecId == nventtrans.InventTransOrigin

 

 

 

join subledgerVoucherGeneralJournalEntry where inventtrans.Voucher == subledgerVoucherGeneralJournalEntry.Voucher

 

 

 

join generalJournalAccountEntry where subledgerVoucherGeneralJournalEntry.GeneralJournalEntry == generalJournalAccountEntry.GeneralJournalEntry

 

 

 

join dimensionAttributeValueCombination where generalJournalAccountEntry.LedgerDimension == dimensionAttributeValueCombination.RecId

 

 

 

join mainAccount1 where  dimensionAttributeValueCombination.MainAccount == mainAccount1.RecId

 

 

 

join mainAccountCategory where mainAccount1.AccountCategoryRef == mainAccountCategory.AccountCategoryRef

 

 

 

join ledger where mainAccount1.LedgerChartOfAccounts == ledger.ChartOfAccounts

 

 

 

join companyinfo where ledger.PrimaryForLegalEntity == companyinfo.RecId

&& mainAccount1.RecId == mainAccount.RecId && companyinfo.DataArea ==

 

curext()

Here that relation wich is highlited is not proper for me, the Voucher is same for multiple Item.. so is their any other way to do this


Viewing all articles
Browse latest Browse all 73760

Trending Articles