Skip to main content

Notifications

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 404
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.
  • Suggested answer
    Waed Ayyad Profile Picture
    8,256 Super User 2025 Season 1 on at
    How to automatically refresh form without datasource after clicking on OK button
    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
     
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,624 Moderator on at
    How to automatically refresh form without datasource after clicking on OK button - D365F&O
    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();
  • Layan Jwei Profile Picture
    7,778 Super User 2025 Season 1 on at
    How to automatically refresh form without datasource after clicking on OK button - D365F&O
    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
    Mohamed Amine Mahmoudi Profile Picture
    21,851 Super User 2025 Season 1 on at
    How to automatically refresh form without datasource after clicking on OK button - D365F&O
    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,125 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,871 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans