How can you create a simple dialog in Dynamics AX?

How can you create a simple dialog in Dynamics ax?

+8
axapta x ++
source share
2 answers
static void DialogSampleCode(Args _args) { Dialog dialog; DialogField field; ; dialog = new Dialog("My Dialog"); dialog.addText("Select your favorite customer:"); field = dialog.addField(typeid(CustAccount)); dialog.run(); if (dialog.closedOk()) { info(field.value()); } } 
+21
source share

for really simple dialogs use Box Class :

  Box::info("your message"); 

or

  Box::warning("your message"); 

or

  if (Box::okCancel("continue?", DialogButton::Cancel) == DialogButton::Ok) { // pressed OK ... 

or one of the other static methods ( infoOnce , yesNo , yesNoCancel , yesAllNoAllCancel , ...)

+16
source share

Source: https://habr.com/ru/post/649911/


All Articles