Dialog dlg;
DialogGroup dGrp;
DialogField dfCustomer;
dlg = new Dialog("Simple Dialog");
dGrp = dlg.addGroup("A Group");
dfCustomer = dlg.addField(extendedTypeStr(CustAccount));
if (dlg.run())
{
info(dfCustomer.value());
}
Because CustAccount is linked to the AccountNum field in the table CustTable dynamics will convert the field to a dropdown and populate it with all the records of that table.