如何在Dynamics ax中创建一个简单的对话框?
答案 0 :(得分:22)
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());
}
}
答案 1 :(得分:17)
对于非常简单的对话框,请使用Box Class:
Box::info("your message");
或
Box::warning("your message");
或
if (Box::okCancel("continue?", DialogButton::Cancel) == DialogButton::Ok)
{
// pressed OK
...
或其他静态方法之一(infoOnce
,yesNo
,yesNoCancel
,yesAllNoAllCancel
,...)
答案 2 :(得分:0)
DAX 2012没有“ typeid”作为方法。但是您可以使用extendedTypeStr,然后传入一个已知的EDT或使用内置的字符串长度版本:
Me.Query1SF.Form.Filter = "[Location]='" & Me.[SiteCombo].Value & "' And IsDate([Site RS])=True"