static void ExportSecurityGroups(Args _args) { SysSecurityUserGroup sysSecurity = SysSecurityUserGroup::construct(); UserGroupInfo userGroupInfo; #file Dialog dialog = new Dialog("@SYS14863"); DialogField dialogFileName; Object formdialog; ; dialogFileName = dialog.addField(typeid(FilePath),"@SYS16423"); dialog.doInit(); formdialog = dialog.formRun(); formdialog.filenameLookupTitle("@SYS53669"); if (dialog.run() && WinAPI::pathExists(dialogFileName.value())) { while select userGroupInfo { sysSecurity.parmUserGroupId(userGroupInfo.id); sysSecurity.load(); sysSecurity.export(dialogFileName.value() + @'\' + userGroupInfo.id + '.asg'); } } else warning("No action taken..."); info("Done"); }
When wanting to clear dynalinks between two forms, you can clear the dynalinks on the DS on the second form. See example below.
Clear DynaLinks public void init() { ; super(); if (element.args() && element.args().caller() && (element.args().caller().name() == formStr (PurchTable))) { InventTable_ds.query().dataSourceTable(tableNum(InventTable)).clearDynalinks(); } }