Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / How can I refresh curr...
Finance forum

How can I refresh current immediately after close a dialog page?

(0) ShareShare
ReportReport
Posted on by 960

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)

5165.3.png

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at
    RE: How can I refresh current immediately after close a dialog 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.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: How can I refresh current immediately after close a dialog page?

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,219 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,980 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans