Good afternoon from Gran Canaria.
I need a little help with SolutionModel.
My customers form has a tabpanel with some forms inside it. In the irst show of the form a create a new tab from a form that is created with SolutionModel here is the code:
/**
* @properties={typeid:24,uuid:"A927A8FC-23D6-4A70-AB43-C48F2BC3DCC3"}
*/
function addBalanceTab(){
var lcSQL="SELECT h.fecha, h.idcliente, h.concepto, h.debe, h.haber, \
SUM(h.debe-h.haber) OVER(PARTITION BY h.idcliente ORDER BY h.idcliente, h.fecha) AS saldo \
FROM historico_clientes h \
WHERE h.idinquilino=? AND h.idcliente=? \
ORDER BY h.idcliente, h.fecha";
var aArgs=new Array();
aArgs.push(globals.currentInquilinoID);
aArgs.push(foundset.idcliente);
var _ds=databaseManager.getDataSetByQuery('gsdespachos',lcSQL,aArgs,-1);
var uri=_ds.createDataSource('extracto');
var frmExtracto=solutionModel.newForm('frmExtractoClientes',uri,'listafiltros',false,150,650);
frmExtracto.extendsForm='lstExtractoClientes_GSDespachos';
var txtFecha=frmExtracto.newTextField('fecha',1,1,90,20);
txtFecha.editable=false;
txtFecha.format='dd-MM-yyyy';
txtFecha.styleClass='listafiltros';
var txtConcepto=frmExtracto.newTextField('concepto',20,20,260,20);
txtConcepto.editable=false;
txtConcepto.styleClass='listafiltros';
var txtDebe=frmExtracto.newTextField('debe',30,30,100,20);
txtDebe.editable=false;
txtDebe.format='#,##0.00';
txtDebe.styleClass='listafiltros';
txtDebe.horizontalAlignment=SM_ALIGNMENT.RIGHT
var txtHaber=frmExtracto.newTextField('haber',40,40,100,20);
txtHaber.editable=false;
txtHaber.format='#,##0.00';
txtHaber.styleClass='listafiltros';
txtHaber.horizontalAlignment=SM_ALIGNMENT.RIGHT;
var txtSaldo=frmExtracto.newTextField('saldo',50,50,100,20);
txtSaldo.editable=false;
txtSaldo.format='#,##0.00';
txtSaldo.styleClass='listafiltros';
txtSaldo.horizontalAlignment=SM_ALIGNMENT.RIGHT;
var tb=elements.tabHistoricos.addTab(forms['frmExtractoClientes'], 'tabExtracto', 'Extracto', null, null, null, null);
}
This works pretty well I can see the new tab but now I need to reload that form data everytime the record is changed in the customers form. Of course I have to put the code in the onRecordSelection of the customers form, but how can I reload the foundset of the form frmExtractoClientes?
Thanks in advance.