Quantcast
Viewing all articles
Browse latest Browse all 73760

AX 2012 Relating InventPosting.LedgerDimension with generalJournalAccountEntry

Hi I have a select statement in X++ that I'm using to try to sum up all the ledger entries tied to a specific InventPosting record.  The problem I'm finding is LedgerDimension on inventPosting doesn't tie directly to generalJournalAccountEntry.  I know I have to do something with the dimensionStorage class to get the proper relationship but I'm not sure how to do that. 

 

Here's my select below:

 

Select sum(AccountingCurrencyAmount) from generalJournalAccountEntry

join RecId from generalJournalEntry where generalJournalEntry.Recid == generalJournalAccountEntry.GeneralJournalEntry

join RecId from subledgerVoucherGeneralJournalEntry

where subledgerVoucherGeneralJournalEntry.GeneralJournalEntry == generalJournalEntry.Recid

&& generalJournalAccountEntry.LedgerDimension == InventPosting.LedgerDimension  <-- this doesn't work.

 

Finally, I would like to also add in InventSite to this select.

 

Ideally, I'm looking for a select that sums up the AccountingCurrencyAmount from the generalJournalAccountEntry where the dimensions are tied to a specific InventPosting Account and a specific InventSite dimensions. 

 

Any ideas?

 

 

 


Viewing all articles
Browse latest Browse all 73760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>