web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

AX 2012: Refresh caller form datasource

M Anas Khan Profile Picture M Anas Khan 1,424

The following code refreshes the caller form datasource from the calling form:

void clicked()
{
    Args    arg = new Args();
    FormRun formRun;    
    ;

    arg = new args(formstr(YourForm));
    arg.record(yourTable);
    arg.caller(this);
    formRun = classFactory.formRunClass(arg);
    formRun.init();
    formRun.run();
    formRun.wait();
    formRun.detach();
    
    YourTable_DS.reread();
    YourTable_DS.rereadReferenceDataSources();
    YourTable_DS.research(true);
}

1. reread() – Rereads the current record from the database
2. rereadReferenceDataSources() – Rereads the reference records of the current record from the database
3. research(true) – true parameter retains the current position of the dataSource cursor after researching



This was originally posted here.

Comments

*This post is locked for comments