AX – D365FO – How to access Args Parameters inside dialog() in a runbasebatch class?

I want to pass the Args.parm() value from Main() method of a RunBaseBatch to the dialog() method of the same RunBaseBatch.

First of all declare a new string variable called “argsParm” in the declaration method of the RunBaseBatch class and add it to the #localMacro.CurrentList macro

/// </remarks>

class TaxReport extends RunBaseBatch
   NoYes                   updateNow;
   TaxPeriod               taxPeriod;
   str                     argsParm;






Then create a new method parmArgsParm() in order to access the variable

public str parmArgsParm(str _argsParm = argsParm)
   argsParm = _argsParm;

   return argsParm;

Then in the Main() method create a new instance of the class and call the parmArgsParm() passing the _args.parm() value

server static void main(Args  _args)


   TaxReport                       taxReport;

   NoYes                           updateNow;

   TaxPeriod                       taxPeriod;

   taxReport = new TaxReport();



   if (taxReport.prompt())


       updateNow         = taxReport.update();

       taxPeriod         = taxReport.taxPeriod();

       fromDate          = taxReport.fromDate();

       transactionDate   = taxReport.transDate();

       settlementAccount = taxReport.parmSettlementAccount();

       taxRepVersion     = taxReport.taxRepVersion();


Then in the dialog() method you can obtain the argsParm value and do what you want

Object dialog()


   DialogRunbase dialog = new DialogRunbase("@SYS23178", this);

   updateNow = false;

   if (argsParm == 'custom')







Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di

Stai commentando usando il tuo account Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...