How can I find main account balance such that start date is the date of the first trans in the account and end date is a certain selected date ? I am trying to use the below code segment , is this right also, how can I check if the returned balance value is correct ?
dimensionAttributeValueCombination= DimensionAttributeValueCombination::find(DimensionAttributeValueCombinationRecID);
mainaccount=MainAccount::find(dimensionAttributeValueCombination.MainAccount);
AccountBalance=mainaccount.getBalance(dateNull(), BalanceAsoffDate,FiscalPeriodType::Operating,OperationsTax::Current);