Creating a Dialog using X++


Static Void DialogExample(Args _args)
{
       Dialog                  dialog;
       DialogGroup         dialogGrp;
        DialogField           dlgCustAccount;
      DialogField           dlgCustName;
      CustAccount         custAcct;
      CustName            custName;
      ;

      dialog.Caption("Customer information");
      dialogGrp = dialog.AddGroup("Setup");
      dlgCustAccount = dialog.addField(ExtendedTypeStr(CustVendAC),"Customer Account");
      dlgCustName = dialog.addField(ExtendedTypeStr(CustName),"Customer Name");

      dialog.run();

      if(dialog.closedok())
     {
          custAcct = dlgCustAccount.value();
          custName = dlgCustName.value();
      }
}

Comments

Popular posts from this blog

Sales order invoice posting using X++ with custom SalesParmLine fields

Create a custom lookup with multiple data sources on form using X++

SalesTable2Line custom field update prompt on Sales order in AX 2012