Getting the list of datasource from the form in Dynamics Ax

Description:-

Sometimes may be there would be need to get the names of the DataSource used in the form. Here is a small snippet that would get you the list of the data source. Here is the Solution to How to get Data Source’s table Name in the form.

Create Job:-

static void getdatasourceslist(Args _args)
{
  FormRunformRun;
  FormBuildDataSourcefbds;
  Args args = newArgs();
  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());
  }
}

Output:-

Related Posts

Thanks for comments.....

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
cheer