Sunday, 25 September 2016

get main account from financial dimension

hi guys,

ive encountered a task where i need to get the main account from financial dimension entered by user, which have transaction in trail balance.

note that,
financial dimension that linked to the main account could be differ from in the main account.


  1. user can either change the financial dimension when they want to post the transaction or, 
  1. user can changed the financial dimension after the transaction posted, with diffrerent financial dimension.
there is a view where you can get the account and financial dimension used on posted transaction.
'DimensionAttributeLevelValueView'


to do so , i used this select statement,

     select DimensionAttribute
            join DimensionAttributeLevelValueView
                where DimensionAttributeLevelValueView.DimensionAttribute == DimensionAttribute.RecId
                && DimensionAttributeLevelValueView.DisplayValue == 'financial dimension value'
            join DimensionAttributeValueCombo
                where DimensionAttributeValueCombo.RecId == DimensionAttributeLevelValueView.ValueCombinationRecId
            join MainAccount
                where MainAccount.RecId == DimensionAttributeValueCombo.MainAccount;

Happy Coding! :)

No comments:

Post a Comment