Notifications
Announcements
No record found.
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
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'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.
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.
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"?
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
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2