web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to Check the Batch Promt action choice, in Batch processing?

(0) ShareShare
ReportReport
Posted on by 110

Hi all,

In my customClass extends RunBaseBatch in method main I need to check the choice selected in to Batch Promt (if is OK or Cancel), in case the Flag Batch processing is selected ON.

BatchDialog

server public static void main(Args _args = null)
{
    MyCustomClass_BATCH localMyCustomClass_BATCH;

    localMyCustomClass_BATCH= new MyCustomClass_BATCH ();

    if (localMyCustomClass_BATCH.prompt() )
    {
        localMyCustomClass_BATCH.run();
    }   

    // HERE I want to check the action selected, if it's OK or Cancel.
// If User clicked on OK or Cancel. }

Thanks all.

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,677 Super User 2026 Season 1 on at

    A simplest way is to use if else

    if (localMyCustomClass_BATCH.prompt())
        {
            info('OK Clicked');
            localMyCustomClass_BATCH.run();
        }
        else
        {
            info('Canceled');
        }

    If you will try to get TaskId for cancel or Ok button, this can be complex.

  • daniele scr Profile Picture
    110 on at

    Thanks for your reply @Sohaib Cheema , but if the Flag Processing is setted to TRUE thwe executing not catch after promt.

  • Sohaib Cheema Profile Picture
    49,677 Super User 2026 Season 1 on at

    Yes, because it goes into batch mode then. a batch mode is something to happen automatically without user interaction. In case of batch it throws info/error/warning messages into logs of batch jobs.

    What is your business requirement. lets forget technical aspects of AX for a moment.

  • Verified answer
    Douglas Noel Profile Picture
    3,905 on at

    Hi,

    after prompt() check yourrunbasebatchinstance.batchrun().parmBatchExecute(). It's NoYes.

    Regards Douglas

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans