Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / How to automatically r...
Finance forum
Suggested answer

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

Posted on by 263
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
    Waed Ayyad 2,689 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
    Bharani Preetham Pe... 3,502 Super User 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
    Layan Jwei 3,282 Super User 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
    Mohamed Amine Mahmoudi 4,565 User Group Leader 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

Helpful resources

Quick Links

Contextual content recommendations & SharePoint Q&A

Instantly access relevant sales materials…

Beyond the DRA Cloud Label Printing

Explore cloud-based label printing within Dynamics 365…

HR Infrastructure Customer merge

Important considerations for HR Customer migrations…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,418 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,760 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,142

Featured topics

Product updates

Dynamics 365 release plans