Thanks a lot Steve,

That info helped me find the problem and now have solved it :))

Basically there was a form with several datasoources.  In the top datasoruce
in the reread method their was a call to research() for the sub datasources.

Now in some code the system modified the top table and then called reread of
the top ds.  So this caused research of the sub to be called which basically
will caused the jump to top (expected behaviour of research as far as I

The only thing I don’t understand is why it didn’t jump to top on every
record!  I guess its something about the form data cache or something like

But I solved by taking the research() calls out of the top ds reread and
putting explicit rereads/refresh of the sub ds in the code.

Now it all seems to work great.

Anyone got any input on why research didn’t go to the top for every record?


-----Original Message-----
[mailto:[EMAIL PROTECTED] On Behalf Of Steeve
Sent: 27 May 2006 01:11
Subject: RE : [Axapta-Knowledge-Village] Reread and refresh problem

I don't know what could be the problem you're facing but here's an
explanation of refresh and reread taken from a post on axapta-dev forum.


Just to clarify a few points...

.refresh() will not reread the record from the database.  It basically just
refreshes the screen with whatever is stored in the form cache.

.reread() will only re-read the CURRENT record from the DB so you should not
use it to refresh the form data if you have added/removed records.  It's
often used if you change some values in the current record in some code, and
commit them to the database using .update() on the table, instead of through
the form datasource.  In this case .reread() will make those changes appear
on the form.

.research() will rerun the existing form query against the datasource,
therefore updating the list with new/removed records as well as updating
existing ones.  This will honour any existing filters and sorting on the

.executeQuery() is another useful one.  It should be used if you have
modified the query in your code and need to refresh the form.  It's like
.research() except it takes query changes into account.

In general, you only need to use one of these in any specific circumstance.

Hope that helps clear it up

Andrew Jones
HGH Business Consultancy

-----Message d'origine-----
De :
[mailto:[EMAIL PROTECTED] De la part de James
Envoyé : 26 mai 2006 12:26
À :
Objet : [Axapta-Knowledge-Village] Reread and refresh problem


I hope someone can share some understanding on something a little technical:

What are the difference of reread and refresh in the context of a form?

I have a modified form that has a problem whereby the user edits a field
value and then press the down arrow key to go to the next record but after
about 20 lines the cursor jumps back up to the first record and the lines
get doubled or tripled.  When I close the form and go back in then again I
see only one set of all the records!!!

I tested and found if I maximize the screen then if I edit any record that
is more than 22 down the list then this result happens but if I make the
screen smaller (i.e. less records displayed in the form) then it happens
after about 19 lines.  I tested sorting and filtering the records and it's
the same once I scroll down the X number of records from the top and edit
then the samething happens so it is not specific records but how many
records down!  Also I know in the field that gets modified there is a load
of reread and refreshes that someone has put (too many I am sure but I am
not really technical enough to say what it should be hence this email).  So
putting it all together I assume it is something about how many records the
form reads into its 'display' memory combined with all these reread and

I hope someone can share the technical side of the reread and refresh or
even better what might be the problem.



[Non-text portions of this message have been removed]

Sharing the knowledge on Axapta.
Visit for axapta friends.
Yahoo! Groups Links

Sharing the knowledge on Axapta.
Visit for axapta friends.
Yahoo! Groups Links

Sharing the knowledge on Axapta.
Visit for axapta friends.

Business finance course Business to business finance Small business finance
Business finance consultant Business finance magazine Business finance schools


Reply via email to