How to refresh the dialog fields

Hi Pioneers,

How to refresh the dialog field in Ax ? In dialog field, I am getting Last used query value. Please guide me.

Thanks In Advance !!!

Please Reply Pioneers…

Dialog fields are not bound to database, therefore “refreshing” can only mean assigning a value again (by DialogField.value()). In case of the query, change the query instance which is returned by queryRun().

If you get last used values, it means that saved values were unpacked to instance variables of your class (if it’s a RunBase class, unpacking happens in promptPrim()). The variables are typically used in dialog() to set dialog field values.

You have two basic options:

  • overwrite last values after they were unpacked and before they were used in dialog
  • don’t save last values (override saveLast() and getLast()).