To refresh a form

Hello

I have an issue regarding the refreshment of data on the form…

actually i have to insert the data through the Excel Sheet to the Form, and after inserting that data I have to refresh that form…But all i have to do is through X++ code only…no button or any thing else…so give me a code which automatically refresh the data after a certain period of time…

Thanks & Regards

Pranav Gupta.

For refreshing data, you’ll probably want to use FormDataSource.research(). A method (of the same object) can be run with a delay by Object.setTimeout().

For example: this.setTimeout(methodStr(Class1, doSomething), 1000);

Notice that AX classes have to explicitly extends Object to inherit its methods, including setTimeout(). (Dark AX magic :)).