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

runbasebatch how to call code when press cancel button

(0) ShareShare
ReportReport
Posted on by 793

Hello,

Could you please tell me how to call any logic when you click on the cancel button in the dialog of the runbasebatch class?

I have the following dialog() method:

DialogRunbase dialog = Dialog::newFormnameRunbase(formstr(NullifyRemainsByWMSLocation_ICL),this);
;
dialog = this.dialogInternal(dialog);

return dialog;

Method calls some specific form I have created in the AOT. According to tutorial class "Tutorial_RunBaseForm" I have added two command buttons "OK" and "Cancel" to my custom form "NullifyRemainsByWMSLocation_ICL".  when I press OK button run() method of my class is called. How to call some logic after the cancel button is clicked on the form?

Thanks.

  • dark_knight Profile Picture
    dark_knight 793 on at
    RE: runbasebatch how to call code when press cancel button

    Thanks a lot Nikolaos^))

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: runbasebatch how to call code when press cancel button

    Not sure about the RunbaseForm. But with normal RunBaseBatch class you call the prompt method to show the dialog (see Tutorial_RunBaseBatch class). If it returns true you call run method. So, prompt method returns true if ok is clicked, otherwise it returns false.

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…

Vahid Ghafarpour – Community Spotlight

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

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,399 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans