how to fetch records automatically(send data to form controls as autosearch) by disabling autosearch

hi everyone

can any one tell how to fetch record automatically when autosearch is set to NO,


when i fetch customer accountnum and name to grid if autosearch is enabled then record shown on grid, If autosearch is set to No, then what should be X++ code which does the same job as autosearch do.

thanks in advance