Powered By Blogger

creating ledger dimension values from mainaccount

    if(journalTableStagingLocal.JVAcntType == LedgerJournalACType::Ledger)

            {

                MainAccount mainAccount;

                container dimAttrValue;


                mainAccount   = MainAccount::findByMainAccountId(journalTableStagingLocal.JVAcntCode);

                dimAttrValue  = [mainAccount.MainAccountId];


                dimAttrValue  += this.getDimensionAttributeValue(MainAccountLegalEntity::findByMainAccountLegalEntity(mainAccount.RecId, CompanyInfo::current()).DefaultDimension);

                ledgerJournalTrans.LedgerDimension = this.generateLedgerDimension(mainAccount, dimAttrValue);

            }

            if(journalTableStagingLocal.JVAcntType == LedgerJournalACType::Vend)

            {

                ledgerJournalTrans.LedgerDimension = LedgerDynamicAccountHelper::getDynamicAccountFromAccountNumber(journalTableStagingLocal.JVAcntCode,LedgerJournalACType::Vend);

            }

            if(journalTableStagingLocal.JVAcntType == LedgerJournalACType::Bank)

            {

                ledgerJournalTrans.LedgerDimension = LedgerDynamicAccountHelper::getDynamicAccountFromAccountNumber(journalTableStagingLocal.JVAcntCode,LedgerJournalACType::Bank);

            }

            if(journalTableStagingLocal.JVAcntType == LedgerJournalACType::Cust)

            {

                ledgerJournalTrans.LedgerDimension = LedgerDynamicAccountHelper::getDynamicAccountFromAccountNumber(journalTableStagingLocal.JVAcntCode,LedgerJournalACType::Cust);

            }

No comments:

Post a Comment

DisableStandredButton

 My requirement is to disable the delete button for journals that were posted:- After Posting the button is enabled fig:- Line level also th...