DialogField dialogMyParameter; str myParameter = "Default value"; #define.CurrentVersion(1) #localmacro.CurrentList myParameter #endmacro public container pack() { // This method is used by batch platform to serialize batch parameters in a container return [#CurrentVersion, #CurrentList]; } public boolean unpack(container _packedClass) { // This method is used by batch platform to deserialize batch parameters from stored // batch parameter container Integer version = RunBase::getVersion(_packedClass); container packedData; switch (version) { case #CurrentVersion: [version, #CurrentList] = _packedClass; break; default: return false; } return true; } public Object dialog() { // This method is invoked when user opens batch parameter dialog // It helps to add parameters to batch class and set their default value DialogRunbase dialog = super(); dialogMyParameter = dialog.addField(enum2Str(Types::Integer), "My Parameter"); // Set a default value of parameter dialogMyParameter.value(myParameter); return dialog; } public boolean getFromDialog() { // This method is invoked by batch platform to read the values of parameters from batch // parameter dialog method myParameter = dialogMyParameter.value(); return super(); } public void run() { // This method is the entry point for the batch class info("Batch job started!"); // Access the parameter value entered by the user info("My Parameter: " + this.myParameter); // Your main batch logic goes here info("Batch job completed!"); } public static void main(Args _args) { // This method is used to create an instance of the batch class, prompt the user // for input using dialog, and then execute the batch job using run(). MyBatchClass batch = new MyBatchClass(); if (batch.prompt()) { batch.run(); } }
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 Pallavi Phade as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 796
André Arnaud de Cal... 721 Super User 2025 Season 2
Sohaib Cheema 530 User Group Leader