Hello awesome community! I'm new to Ax and its development still training and I seek your help if you please! :)
(Excuse my noob Ax langauge in describing)
First Location:
General Ledger > Journals > General Journals > Lines
I'm developing a report about a payment voucher, I have multiple lines, some lines have a "Sales Tax Group".
What I need to get is the tax "Main Account" Number and Its "Account Name"
Here is the a screenshot that shows the values I want to get:


The above picture shows the 2 data I need, the "Main Account" and next to it the "Name"
I have this select statement
select * from _mainaccount join
TaxLedgerAccountGroup join
DimensionAttributeValuecombination
where
TaxLedgerAccountGroup.TaxOutgoingLedgerDimension == DimensionAttributeValuecombination.RecId &&
DimensionAttributeValuecombination.MainAccount == _MainAccount.RecId ;
VatMainAccount = _mainaccount.MainAccountId;
Vatmainaccountname = _mainaccount.Name;
Because i'm a noob, I don't know what should I change in the above "Select" statement to make it bring the correct main account and name related to the line.
What should I modify in it to make it bring the "Main Account" and "Name" related to the current line in my query?
Thanks in Advance!