Thanx, a used the research()



Daniel J. Redelinghuys
Axapta Developer  UTi-Sun Couriers Division
Tel: +27 12 673 2324 Fax: +27 12 673 2344


-----Original Message-----
From: ozzage [mailto:[EMAIL PROTECTED]
Sent: 01 February 2005 11:13 PM
To: development-axapta@yahoogroups.com
Subject: [development-axapta] Re: Refresh data source on Form





Hi Daniel

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() is probably what you want.  This 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 form.

.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

--- In development-axapta@yahoogroups.com, "Daniel Redelinghuys"
<[EMAIL PROTECTED]> wrote:
>
> Thanx for all the responses.
>
>
>
> Daniel J. Redelinghuys
> Axapta Developer  UTi-Sun Couriers Division
> Tel: +27 12 673 2324 Fax: +27 12 673 2344
>
>
> -----Original Message-----
> From: rozaini comel [mailto:[EMAIL PROTECTED]
> Sent: 01 February 2005 10:47 AM
> To: development-axapta@yahoogroups.com
> Subject: Re: [development-axapta] Refresh data source on Form
>
>
>
>
> Hi,
>
> u can use functions below.. replace datasourcename with ur real
datasource
> name.
>
> datasourcename_ds.reread();
> datasourcename_ds.research();
>
> Daniel Redelinghuys <[EMAIL PROTECTED]> wrote:
>
> Hi all
>
> How would I refresh the data source on a form to display all new
data in the
> table on the form after a update from the Form.
>
> thanx.
>
> Daniel J. Redelinghuys
> Axapta Developer  UTi-Sun Couriers Division
> Tel: +27 12 673 2324 Fax: +27 12 673 2344
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
> ---------------------------------
> Yahoo! Groups Links
>
>    To visit your group on the web, go to:
> http://groups.yahoo.com/group/development-axapta/
>
>    To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
>    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
> SMILE
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
>
> Yahoo! Groups Links









Yahoo! Groups Links













Yahoo! Groups Links

Reply via email to