MainAccount display and offsetAccount display based on General ledger dimensions


LedgerJournalTrans Table methods() for MainAccount display and offsetAccount display

    DimensionAttributeValueCombination  ledgerDimension;
    LedgerJournalAC                                   account;
 
   //MainAccount display
   if (this.LedgerDimension)
   {
            // If the account has not been changed, then pull the value from ledger dimension as the                        //master
            select DisplayValue from ledgerDimension where ledgerDimension.RecId ==                                                                 this.LedgerDimension;
            account = ledgerDimension.DisplayValue;
    }

   //offsetAccount display
    if (this.OffsetLedgerDimension)
        {
            // If the account has not been changed, then pull the value from ledger dimension as the                        //master
            select DisplayValue from ledgerDimension where ledgerDimension.RecId ==                                           this.OffsetLedgerDimension;
            offsetAccount = ledgerDimension.DisplayValue;
        }

Comments

Popular posts from this blog

Getting Workflow Approvers In Dynamics AX (AX 2012)

To find details individually for ledgerjournaltrans default dimensions

Creating a numbersequence in form level in ax 2012