AX Research Single Record

Fellow DAXers,

I have a parent form, and a child form. Unlike the common reread/refresh or research scenario, I would like to upon close of the child form to only refresh a single record and not the entire recordset as this is on a very high volume table that has a lot of blocking on a good day.

The parent form has a button object, that upon clicked performs the following code:

void clicked()

{

args args;

formRun formRun;

;

args = new args();

args.name(formstr(myChildForm));

formRun = classFactory.formRunClass(args);

formRun.init();

formRun.run();

formRun.wait();

//code for single-record refresh?

super();

}

I have tried to use element.datasource().reread(); and refresh() however the single record is then blanked out…empty record in a set of records displayed.

Thanks all, any advice is greatly appreciated.

Use a specific data source to reread form the database and then refresh the form

tablename_ds.reread();

tablename_ds.refresh();

You can place your code in close method of the child form(before super()) and access the caller data source and then refresh

formDataSource = element.args().record().dataSource();

formDataSource.reread();

Kranthi,

Thanks for the help. In doing the reread and then refresh, it only blanks out the line in the grid instead of refreshing the cache with data for that particular record. It maintains the cursor position on the parent form, however the entire row is now blank on the screen instead of refreshed.

Thanks for any additional advice!

~S