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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Refresh parent form

(0) ShareShare
ReportReport
Posted on by 190

Hi

My parent form is Projtable. I have created a extension of it. The form extension contains a button and after button click I open a newly created form. 

New created form insert data into psaprojschedrole table. After I close this form the grid inside "project team & scheduling" tab should refresh with new data. This is not working.

I have override the canClose method of child form and written following code 

Option1:

Formrun = element.args().Caller() ;

#Task

Formrun.task(#taskF5);

Option 2:

Refreshed the datasource of parent form

FormDS.research(true);

Both the options are not working.

Pradeep M

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

    You should call two methods of the caller data source:

    FormDS.refresh();

    FormDS.research(true);

    But, nowadays you can simply set property "Auto Refresh Data" to Yes in the menu item button.

    By the way, why did you put your code in canClose method? That method should be used to determine if the form can be closed. You should use "closed" or "closedOk" instead. This is important to keep your code understandable for future developers (including yourself).

  • Verified answer
    Evaldas Profile Picture
    1,800 on at

    Sometimes you get another object in between forms, like a class of something.

    Make sure your caller is ProjectTable form.

    Refresh the caller form from close or closed method.

    Try this code from my blog post:

    public

    void close()

       {

           super();

           FormRun formRun = element.args().caller();

           if(formRun)

           {

               #Task

               formRun.task(#taskRefresh);            

           }

       }

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans