Notifications
Announcements
No record found.
Hi All,
I would like to add a batch job function to a form dialog which is not a standard form dialog.
I have changed the class signature like 'Class A extends RunBaseBatch' from 'Class A extends RunBase'. as all jobs that must be able to run in a batch must inherit from this class.
What methods should I add to be able to execute batch job? also recurrence is not needed as it will use instant batch execusion.
Thank you.
Hi ShawnDEV,
there's a tutorial for you, called Tutorial_RunBaseBatch. You will find it in AOT.
Hi Okay. I will try to follow it.
However, I have an error after changing the signature to Class A extends RunBaseBatch.
"A tab control is missing from the form."
Why do I get this error?
as you can imagine, it's not so easy to tell, based on the information that you shared. The issue must be in your code. And we can't see your code.
Please go through the tutorial, and if you have some difficulties understanding it, just let us know.
Hi,
I tried to add methods: pack()
public container pack() { return [#CurrentVersion,#CurrentList]; }
But I got an error that 'Instance of type 'Set' cannot be added to a container'
This is because the variable within #localmacro.CurrentList macro is type of Set
Set selectedRecords = new Set(Types::Record);
Is there a way to bypass it..? or do I need to change the data type totally?
You can only save primitive data types in the packed variables.
You can store a container of RecIds, for example.
You're wrong in thinking that batch classes must extend RunBaseBatch. That's true just for the older framework, but not for SysOperation framework.
Using the newer framework will likely make it easier for you, because you don't have to implement serialization by yourself. You don't know how to do it anyway, so why don't let the system to do the hard work for you? You just need to add a List variable to a data contract, add a parm method and decorate it with a few attributes.
If you insist on using RunBase framework, you'll need to learn a bit about serialization. Your code is failing because object references can't be stored in database - you would have to serialize the Set object in pack() and deserialize it in unpack(). It's not too difficult, but by recommendation is not doing it at all and using the SysOperation framework instead.
I debugged it and got an error 'A tab control is missing from the ... form' in the following class DialogForm.buildControl method.
FormBuildControl buildControl(FormControlName name) { Object ctrl = design.control(name); if (! ctrl) throw error(strfmt("@SYS71925",this.form().name(),name)); return ctrl; }
should the form dialog pattern be 'Tab' in order to show the batch tab?
This doesn't seem to be related to batches at all.
Since you share only fragments of information (and your code), it's really hard to help.
Are you still using RunBaseBatch framework? What is this "buildControl" method? Is it in your batch class? Why?
No, it is from standard DialogForm.buildControl method.
My batch class contains the following dialog() method and its' pattern is Dialog-basic.
public Object dialog() { DialogRunbase dialog = Dialog::newFormnameRunbase(formStr(MyDialogForm),this); dialog.caption(MyDialogCaption); dialog = this.dialogInternal(dialog); return dialog; }
Normally you don't have any forms in batch dialogs.
Based on the information that I know (which is next to nothing, but all that you shared), my advice is: don't try to use forms in batch dialogs. Just implement the dialog in x++.
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 451 Most Valuable Professional
André Arnaud de Cal... 428 Super User 2025 Season 2
BillurSamdancioglu 239 Most Valuable Professional