Hi,
How to get branch from financial dimension in ax2012 through code?
I'm using a table LedgerJournalTrans.
Journal>InvoiceJournal>Financial Dimension.
Regards,
Zohan
*This post is locked for comments
Hi,
How to get branch from financial dimension in ax2012 through code?
I'm using a table LedgerJournalTrans.
Journal>InvoiceJournal>Financial Dimension.
Regards,
Zohan
*This post is locked for comments
Hi,
You can use the following job/code to display the omoperatingUnit number, financial dimensions for a vendor ledger transaction.
static void AXC_LedgerDimension(Args _args) { LedgerJournalTrans ledgerJournalTrans; DimensionAttributeValueSetItem dimensionAttributeValueSetItem; DimensionAttributeValue dimensionAttributeValue; DimensionAttribute dimensionAttribute; VendTrans vendTrans; VendTable vendtable; OMOperatingUnit OMOperatingUnit; DirPartyTable dirpartyTable; while select ledgerJournalTrans where ledgerJournalTrans.TransactionType == LedgerTransType::Vend join vendTrans where vendTrans.JournalNum == ledgerJournalTrans.JournalNum && ledgerJournalTrans.JournalNum == "XYZ" join vendtable where vendtable.AccountNum == vendTrans.AccountNum && vendtable.AccountNum == "V123" join dirpartyTable where dirpartyTable.RecId == vendtable.Party join OMOperatingUnit where OMOperatingUnit.RecId == dirpartyTable.RecId join dimensionAttributeValueSetItem where dimensionAttributeValueSetItem.DimensionAttributeValueSet == ledgerJournalTrans.DefaultDimension join RecId from dimensionAttributeValue where dimensionAttributeValue.RecId == dimensionAttributeValueSetItem.DimensionAttributeValue join RecId, Name from dimensionAttribute where dimensionAttribute.RecId == dimensionAttributeValue.DimensionAttribute { info(strFmt("Account:%1, OperatingUnit: %2, Name: %3, Value: %4", vendtable.AccountNum, OMOperatingUnit.OMOperatingUnitNumber, dimensionAttribute.Name, dimensionAttributeValueSetItem.DisplayValue)); } }
Hi Zohan,
I still don't know exactly what you are trying to achieve but I assume you are trying to retrieve the value of a specific financial dimension from a record in the LedgerJournalTrans. I did a quick search and found the following two articles:
The following article shows you how to retrieve a value based on the LedgerDimension field:
axvuongbao.blogspot.nl/.../how-to-get-ledger-dimension-values-for.html
But since you are talking about a vendor, I think you have a LedgerJournalTrans record where the AccountType == Vendor. In this case I think the following article would better suit your needs. This article will show you how to retrieve a value from the field DefaultDimension:
www.andesoft.net/get-single-element-default-dimension-recid-ax-2012
Hope that helps you out!
Regards,
Riccardo
I want to display the omoperatingUnit number against the vendor which will be in financial dimension. department, employee etc
Hi Zohan,
What do you mean with a branch. Is it a specific name for a configured dimension? Please elaborate.
Hi,
Could you provide some more details about your requirement.When you say invoice journal is it sales (or) purchase and branch means are you referring to individual financial dimensions split.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156