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, ...
Suggested Answer

Can a runbasebatch class refresh form and how ?

(0) ShareShare
ReportReport
Posted on by 596

Hi guys,

I have a Runbasebatch class which is run from a button that it is on top panel of a form. As this is supposed to be a batch job, there are time I manually execute the batch class (that is why I put the button for manual/ad-hoc execution).

Question is can we check if the class ran from this form and if it does, right after it is executed, I want to refresh my form. The form contain grid which has the data source which is same as the data in that batch processes, so I would like to see the updated one.

Thanks

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi, you can check the caller. Please check this thread

    kiwiaxguy.blogspot.com/.../checking-to-see-if-caller-is-form.html

    Since, you have a button in form to call this batch class, you can override clicked method of button and refresh form.

  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi Lars Volt,

    You can add your logic in the clicked method of the button on the form or you can add it in the run base batch class itself. Former will be the more applicable because if the class is running in the batch, you won't get the caller object.

    But when the class is running on batch then the code added in the button clicked method or in the class is of no use.

    Thanks,

    Girish S.

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 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans