Hi, guys
I have 2 questions actually.
I tried to use class: Tutorial_RunBaseBatch to schedule batch.
I wrote some simple insert to a created by me table —on run method of this class. I tested my code, without batch, it works fine and inserts records.
Then i used batch tab of this class to schedule a batch, and after i clicked ok, it gave me a message that my jot is added into batch que.
But after that nothing happens, no inserts were performed. What did i miss?
Also when you open class: Tutorial_RunBaseBatch class, it opens dialog with certain fields. I can not figure out how to control which fields are appearing in this dialog. If i want to use copy of this class, but have my own controls/fields there.
This is my second question, how to change controls on this dialog.
thank you
Hi,
Q1: I think you can try to play around with the functions under, I don’t have Axapta here, so just try:
-
BASIC>PERIODIC>BATCH
-
BASIC>SET UP>BATCH.
Q2: Adding controls to the class, you may want to look into the method dialog(), getfromdialog()…
For the Batch Processing, you can download a good example from MSDN of Microsoft. Just go to MSDN page and serach for “Axapta” keyword.
Hope this help
First of All, instead of modifying the Tutorial_RunBaseBatch class, you should create your own, which extends RunBaseBatch. Then, you should read about the RunBase, RunBaseBatch and RunBaseReport classes in the Developers Guide The fields that are shown on the dialog, are added in the dialog method, which you have to override in your newly created class. The Batch tab appears, if the method canGoBatchJournal() is overridden and the return value of this method is set to True; Also look at the getFromDialog() method - this is where you read the values from your dialog. pack() and unpack() save and get the values the user inserted into the dialog controls the previous time the class was run. Also, the CurrentList local macro in the classDeclaration of your class should be updated to include all the variable names, the values of which you want to save About the first problem - it’s hard to tell, what the problem is - but it might get solved after you figure out all the RunBase* methods. Good luck
hi, guys
thank you for advices and article…will be trying those things now.
thank you again.
thank you again, this article really helped.
Also what is important after all code writing, to really start the batch thru main manu.
thank you again.