Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How to force Batch mode executing in any case for Batch class?

(0) ShareShare
ReportReport
Posted on by 110

I need to force in any case the Batch mode processing for my custom class extends RunBaseBatch by code. The user can't change the execution mode.

The shedule mode must only to be in Batch.
It's possible?

ForceBatchMode.jpg

I try to use in main method, before promt command these code line:

className.mustGoBatch();
className.parmInBatch(true);
className.doBatch();

BUT not work, I see the flag Batch processing switch off.

Thanks

*This post is locked for comments

  • MC08 Profile Picture
    MC08 170 on at
    RE: How to force Batch mode executing in any case for Batch class?

    I meet same problem today and Martin and ievgen's answer get me out the the rid

  • Suggested answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: How to force Batch mode executing in any case for Batch class?

    Hi DanielePax,

    Try to add to a dialog() method next code:

    this.batchInfo().parmBatchExecute(NoYes::Yes);

    or it could be done in main() as well

    className.batchInfo().parmBatchExecute(NoYes::Yes);
    
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,458 Most Valuable Professional on at
    RE: How to force Batch mode executing in any case for Batch class?

    You can use className.batchInfo().parmBatchExecute(true) to change the value, but if users shouldn't be able to change it, you probably shouldn't be showing it at all.

  • Suggested answer
    JII SAADUDDIN Profile Picture
    JII SAADUDDIN 1,832 on at
    RE: How to force Batch mode executing in any case for Batch class?

    I think it is doing part of exploiting the AX.. In my observation cannot be but you can able to customize runbatch. would?

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans