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

Form does not refresh when update field

(0) ShareShare
ReportReport
Posted on by 40

Hi,

I have added a custom code on the field form "Map to travel requisition", where during the update of "Map to travel requisition" field it will auto delete the existing lines and create new lines based on the value of the field. From the back end, i already check the data in the database that my code work fine.

pastedimage1595564429505v1.png

The problem that i encounter is the form does not refresh after i select another value for the field. I have to manual refresh the form or delete one of the existing line, then the lines will automatic refresh the new value that i have created in my code. I already try research() and refresh() in the onModified() method of the field but it does not work.

How can i make the form auto refresh instead have to manually refresh or delete? 

Thanks in advance.

Regards,
Afieq

I have the same question (0)
  • nmaenpaa Profile Picture
    101,172 Moderator on at

    Did you try to set AutoRefreshData to Yes on the button?

  • Afieq Suhaimi Profile Picture
    40 on at

    Hi Nikolaos,

    What do you mean by set AutoRefreshData to Yes on the button?

    Which button are you referring?

    Because i don't customize any button on the form.

    Regards,

    Afieq

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

    If the process is not launched by a button, then my suggestion is not valid for you.

    Anyway you can manually refresh the data source by calling following code lines after running your logic:

    formDataSource.refresh();
    formDataSource.research(true); // provide "true" if you wish to keep the selection/position in the datasource

  • WillWU Profile Picture
    22,363 on at

    Hi Afieq,

    Please try

    ds.reread();
    
    ds.refresh();

  • Verified answer
    mhdshb1 Profile Picture
    1,250 on at

    Hi Afiq,

    The solution for this issue is mentioned above, but if you are already using the research and refresh data source in your onModified method which is correct. It might be something else, so can you show us your code?

    Regards,

    M

  • Suggested answer
    Afieq Suhaimi Profile Picture
    40 on at

    Hi all,

    Thanks for your suggestions.

    I have figure out the solution for my problem. As Mohammad Al-Saheb have mention the solution for my problem was already correct where i have use the onModified method for my issue.

    My custom code was causing the problem, after i have corrected my code and then use the ds.research() method after it then my form can automatically refresh the new data without having to manual refresh or delete the existing data.

    Regards,

    Afieq

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 797

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 610 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 534

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans