18.3.2026
Refreshing data source on the calling form in AX 2012

It is just calling the task which stands behind pressing F5 button on the form. There is a macro definition #taskF5 in macro library #Task. This could be done like in example below:
protected void refreshDataSource(Args _args)
{
FormDataSource dataSource;
#Task
if (_args && _args.dataset() && _args.record().isFormDataSource())
{
dataSource = _args.record().dataSource();
if (dataSource.formRun())
{
dataSource.formRun().task(#taskF5);
}
}
}
The example given above is applicable only if there is a single root data source on the refreshed form.
Porozmawiajmy o Twoim projekcie
Napisz, z czym przychodzisz: wdrożenie, migracja, rozwój systemu albo pytanie, na które szukasz odpowiedzi. Wracamy z konkretną propozycją następnego kroku, nie z prezentacją handlową.
Dziękujemy za wiadomość!
Oops! Something went wrong while submitting the form.




