AX – D365FO – Add a default value to a dialog field in a RunBase dialog (or RunBaseBatch)

If you want to add a default value in a RunBase dialog field you can use dialog.addFieldValue() in the dialog() method :

public Object dialog()

{
   
dialog = super();

   
dialog.addGroup("@SYS7764");

   
dialogCurrency = dialog.addFieldValue(ExtendedTypeStr(CurrencyCode), 'EUR', "Currency");

   
return dialog;

}

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