Announcements
Hi
I meet a problem. In my Main page(Detail Master), I insert an "Display Menu Item" which can open a "Dialog Page". This "Dialog Page" can create a new item in Main page. After I click "create" in Dialog Page, the Dialog page will be closed. Then I have to click "Refresh" in the Main Page, then the new item will show up. How can I make the new item to show up immediately after the Dialog Page closed?
I wrote few code to do it, but it does not execute. Is my code wrong? If it is right, where should I put it, so it can be executed?
(This is the form of Main Page)
Just to add to previous suggestion:
We have the below methods for fetching data after any changes are made.
Refresh() refreshes the user view with whats stored in the caches. This does not touch the DB.
Use this after any form change has been made through code.
Reread() fetches only the current record from database and does not re read the complete datasource.
Use this when you need to update only the current record after modifying any value.
Research() will execute the same query again and fetch the results from the database.
Use this if you need to get the current most data from database.
ExecuteQuery() will run the query again just like research does but it will also take any query changes into account.
Use this is you have modified the query on run-time and need the updated results according to the new query.
Hope it will help.
Hi JustZM,
Research the datasource that you inserted value rightly after the dialog is closed into via yourDataSource_ds.research();
Have a look at this blog: https://community.dynamics.com/ax/b/msdynamicsax2009abdelahmed/archive/2012/06/21/how-to-refresh-the-data-source-of-caller-form-using-x-in-ax-2009
André Arnaud de Cal...
294,219
Super User 2025 Season 1
Martin Dráb
232,980
Most Valuable Professional
nmaenpaa
101,158
Moderator