web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to refresh form in x++

(0) ShareShare
ReportReport
Posted on by

Hi,

How to refresh a current form in x++,(not a caller form)

I write a code for update in form button's clicked method.

after that I wrote code like this

datasource.reread();

datasource.research(true);

If I try to update 2 records value, Last updated records only show in form grid, once refresh the form grid show all updated records..

Give a suggestion for How to refresh the form in x++?

Thanks in advance

  • Verified answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    No code needed, just set property "Auto refresh data" of the button to Yes.

    Alternatively via x you can use

    datasource.refresh();
    datasource.research(true);

  • Verified answer
    WillWU Profile Picture
    22,363 on at

    Hi Ashokkumar,

    And you could check the following blog to figure out refresh, reread, research, executeQuery method:

    community.dynamics.com/.../tutorial-58-refresh-reread-research-executequery-which-one-to-use-63

  • Verified answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    I think you are updating more than one record with the button(it is correct?). What is the SaveRecord property on the button?

    If you don't mind losing values like filters/position, you can use ExecuteQuery.

    community.dynamics.com/.../tutorial-58-refresh-reread-research-executequery-which-one-to-use-63

  • Community Member Profile Picture
    on at

    Hi, Thanks for your reply

  • Community Member Profile Picture
    on at

    Thanks for your response

  • Community Member Profile Picture
    on at

    Thanks for your response

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 430 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 368

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 364 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans