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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to automatically refresh form without datasource after clicking on OK button

(2) ShareShare
ReportReport
Posted on by 406
Hi, i want to automatically refresh form lines when i click on OK Button for the credit invoicing in the free text invoice. how it can be done?
NOTE: the form name is CustVendCreditInvoicing. no data source available. im just extending the ok button to add a functionality.
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,765 Super User 2025 Season 2 on at
    Hi,
     
    you can use this code to refresh the parent form
    FormRun formRun;
    
    formRun = args.caller();
    if(formRun)
    {
        formRun.doResearch();
        FormDataSource ds = formRun.dataSource(tableStr(SACCustTable));
        ds.reread();
        ds.refresh();
    }
    Best regards,
    Mohamed Amine MAHMOUDI
  • Layan Jwei Profile Picture
    8,165 Super User 2025 Season 2 on at
    Hi D365FO ERP Developer,

    I think what you mean, is that you are trying to refresh the caller form data source?

    if this is the case, then check this link

    https://axcompendium.wordpress.com/2015/05/24/how-to-refresh-caller-datasource/

    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
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    I assume you are trying to click ok on some dialog form where no datasource exists but some caller is there and you want to refresh before this dialog closes. Then you just need to get the caller formrun object and get the main datasource of that caller and write the below code like,
     
    caller_ds.reread();
    caller_ds.research();
  • Suggested answer
    Waed Ayyad Profile Picture
    9,056 Super User 2025 Season 2 on at
    Hi,
     
    Check the following link it may be help you:
     
     
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 444 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 288 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans