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

  • Verified answer
    Evaldas Profile Picture
    1,800 on at
    RE: Refresh parent form

    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);            

           }

       }

  • Suggested answer
    nmaenpaa Profile Picture
    101,156 Moderator on at
    RE: Refresh parent form

    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).

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February 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... 292,892 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,772 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans