Get customer Transaction Balance in MSD Axapta

 To Get customer Transaction Balance in Axapta you can try following code to get balance for particular customer. You can try code in job to check output.

 CustTrans custTrans;  
 ;  
 select sum(AmountMst) from custTrans where custTrans.AccountNum == '00000343';  
 info(strfmt("%1",CustPaymManTrans::openAmountMST('00000343')+custTrans.AmountMST));