AX – How to add a file dialogField in a RunBase (or RunBaseBatch) dialog

We need to add a file type dialog field in a RunaBase or RunBaseBatch dialog

How to do in x++

Class Declaration

class ImportDemandForecastCSV extends RunBaseBatch

{

   DialogRunbase   dialog;

   DialogField     dialogFileName;

   FileName        fileName;

 

   #define.CurrentVersion(1)

   #define.Version1(1)

   #localmacro.CurrentList

       fileName

   #endmacro

}
public Object dialog()

{

  dialog = super();

 
  dialog.addGroup("@SYS7764");

  dialogFileName = dialog.addField(ExtendedTypeStr(Filenameopen), "File Name");

 
  return dialog;

}
public boolean getFromDialog()

{

   fileName    = dialogFileName.value();

   return super();

}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s