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

Notifications

Announcements

No record found.

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

I have the same question (0)
  • Verified answer
    nmaenpaa Profile Picture
    101,160 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,361 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans