Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / How to refresh data on...
Finance forum
Unanswered

How to refresh data on the form level with X++?

Posted on by 55
Hello, I have a form and a dialog in D365FO that when I click the Ok button, it modifies the data.
My only problem is when the dialog is closed, the data on the form level is not refreshed until I click the refresh button above the form.
How can I write this in my code.
 
I tried the datasource.refresh() and reread() but nothing worked.
 
Can someone help?
 
  • Anthony Blake Profile Picture
    Anthony Blake 1,061 on at
    How to refresh data on the form level with X++?
    I think you must be calling it from the wrong place/method/event handler, because the code below looks okay. Share your code & debug results.
  • Layan Jwei Profile Picture
    Layan Jwei 4,395 Super User on at
    How to refresh data on the form level with X++?
    Hi Roy,
     
    I think it should work if you did this for the caller datasouece. Please share ur code with us.
  • Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 6,833 User Group Leader on at
    How to refresh data on the form level with X++?
    Hi @Roy
     
    I hope this can help you and give you some hints.
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Waed Ayyad Profile Picture
    Waed Ayyad 3,592 on at
    How to refresh data on the form level with X++?
    Hi,
     
    Can you share your code? Did you get caller DataSource?
     
    Also try to use the following:
    YourCallerds.reread();
    YourCallerds.rereadreferencedatasource();
    YourCallerds.research(true);
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Roy Saliba Profile Picture
    Roy Saliba 55 on at
    How to refresh data on the form level with X++?
    Yes I tried but nothing worked
  • Layan Jwei Profile Picture
    Layan Jwei 4,395 Super User on at
    How to refresh data on the form level with X++?
    Hi,
     
    Did you try to call together "reread then refresh"?
     
    Or try to call research(true); alone
     
    Thanks,
    Layan Jweihan 
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future

Helpful resources

Quick Links

First Dynamics 365 Community Call (CRM Edition)

Don't miss the first D365 Community Call on 7/10!

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 285,642 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,485 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans