I'm currently working with a form that has a grid at the bottom. Whenever I hit f5, the grid refreshes, but the rest of the form does not. What can I do to make the entire form refresh it's data?
Thanks.
I'm currently working with a form that has a grid at the bottom. Whenever I hit f5, the grid refreshes, but the rest of the form does not. What can I do to make the entire form refresh it's data?
Thanks.
You may override the research
method on a datasource:
public void research(boolean _retainPosition = false)
{
super(_retainPosition);
other_ds.research(_retainPosition);
}
The other_ds
is a datasource not joined by the current datasource.
It depends on the form you are working with. When you hit F5 on a record, it runs the research
method on the datasource the record belongs to or its parent datasource (depends on the form's query, e.g. if you hit F5 on SalesLine in the SalesTable form, SalesTable_ds.research(true)
will be run). As I see it, if the rest of your form displays fields that belong to these datasources then these fields will be updated. If the fields do not belong to these datasource the rest of your form will not be updated (unless e.g. the active
method has been overridden to refresh the rest of the form from the code.
What you can do to make the entire form refresh its data when F5 is hit: again, it depends on the form, so not knowing all the details it is difficult to advise something, but one of the things you can do is override the research
method on your datasource and refresh the rest of the form programatically from there. It is more common to override the active
method, you should normally go for it.
© 2022 - 2024 — McMap. All rights reserved.
refresh
called in AX 4.0 but in AX 2009/2012research
is called when F5 is clicked, andrefresh
is triggered by Ctrl+F5? – Billetdoux