Announcements
No record found.
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.
RunBaseBatch
main
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
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.
Thanks for your reply @Sohaib Cheema , but if the Flag Processing is setted to TRUE thwe executing not catch after promt.
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.
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Joris dG 5
Alexey Lekanov 2
Henrik Nordlöf 2 User Group Leader