Refresh the data of form


On SalesTable form i have a menu button “Menu1”

This button is used to open a form B which would insert some data in
SalesTable Table at click of OK command button. Along with the ‘create new(FormB)’ form one more form also opens which shows the newly created record.

At the same time my SalesTable form is also open.

Now i want SalesTable form to show the newly inserted record as soon as i create the record.

I have refered the previous posts discussing how to refresh a parent form. The solution suggested there does not work for my case.

I just want my SalesTable form to be refreshed when i clicked on the OK button of form B.




In the click method of ur menuitem after super() write

SalesTable_ds.reread() ;

SalesTable_ds.refresh() ;

SalesTable_ds.exequteQuery() ;

and where you r updating the salesTable in that forms method write salesTable.reread(); (after updation)

Create a button auto refresh

void clicked()

SalesTable cacheRec;
int i;


i= 1 * 60 * 1000; // Refresh every minute

cacheRec = Salestable::find(Salestable.RecId);
Salestable _ds.research(true);

Salestable _ds.refresh();

Try this if u r able to do it. I hope it will help


You need to use args class to refresh sales form . catch args object of sales form in your form and call execute query method.

Thank you all for your replies…!!

HI Paji,

Try this it will work.

On child form

in class declaration method

Formdatasource callingformdatasource;

in init method of child form

callingformdatasource = element.args().record().datasource();

then after whatever operation you want to refresh the parent form data in that write following code.



Hope this will be helpfull to you.


Kirtan Dave