Sometimes may be there would be need to get the names of the datasources used in the form . Here is a small snippet that would get you the list of the data source
static void datasources(Args _args)
{
FormRun formRun;
FormBuildDataSource fbds;
Args args = new Args();
Counter i;
;
args.name('Salestable'); //FormName
formRun = classFactory.formRunClass(args);
for (i = 1; i <= formRun.form().dataSourceCount(); i++)
{
fbds = formRun.form().dataSource(i);
info(new DictTable(fbds.table()).name());
}
}
The output of the following code is
No comments:
Post a Comment