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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Pop-up the message box after clicking on OK button when batch process flag is true on dialog box

(0) ShareShare
ReportReport
Posted on by

background of the requirement.

I need to open the message box after clicking on OK button of dialog box to show the information of dialog box values which are entered by user...Eventually, also show the values on message box when user clicks on batch process flag on dialog box and click on OK button. But, right now what happens is when i select batch process flag and click on button, it is not giving me my message box in case of batch process flag true. it directly adds the batch in queue.....so i need to do this on conditional basis. (in message box there will be" do you want continue? yes or no...If user selects yes then it should add the batch in queue else it wont).

So for this i am trying to get the caller name of that class in run base batch class then i will return the prompt as true and it will go to that my class to execute the message box. If user selects yes then i will try to add that class in batch or else show the error message. Do you guys have any other solution please suggest. that too

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    I'm glad you've moved your question to a forum, but you didn't provide any more details, as I requested. Let me repeat once more what I mentioned in email:

    Please add more information to the forum thread, because I don't understand very well what you're trying to achieve and what you've done. If you want a message directly after clicking the button but it doesn't work in batch, you're clearly doin it at a wrong place. If your logic must be inside run(), it can't show anything when scheduling the batch (because it hasn't run yet), therefore the solution design is wrong. I don't understand what you're trying to do with the class name, but such things almost always mean a wrong design. You shouldn't need such things in object-oriented code.

    You can't expect us to tell you what's wrong with your code if you don't tell us anything about it.

  • Community Member Profile Picture
    on at

    Hi Martin,

    What i want is before adding the batch job in queue i need to show my message box (yes or no). If user say yes then only it should allow to add the batch in queue otherwise it should not.

  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    That sounds easy. What problem do you have with it? Maybe you don't know where to do it, or how to show the box, or something...

    Also, how is it related to ("i am trying to get the caller name of that class in run base batch class"?

  • Community Member Profile Picture
    on at

    Hi martin,

    Thats what my concern...How i need to achieve this in case of batch process flag true.

    Is it possible to do it or not? and if yes how to do it..please give me some suggestions

  • Suggested answer
    Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    Of course it's possible, the whole framework is written in X++, so you can change any part of it.

    Unfortunately you didn't tell me which part you don't understand, so let me give a simple example how it could be done. It assumes that your class extends RunBaseBatch - it's overriding one of its methods.

    protected void doBatch()
    {
        if (Box::yesNo("Vent radioactive gas?", DialogButton::No) == DialogButton::Yes)
        {
            super();
        }
    }

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans