Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Can a runbasebatch class refresh form and how ?

(0) ShareShare
ReportReport
Posted on by 592

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

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Can a runbasebatch class refresh form and how ?

    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.

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: Can a runbasebatch class refresh form and how ?

    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.

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

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans