2 Apr 2013

Finding all data sources in a form through Job

Here is small trick to find the datasource in form. Open job node , and a new job and copy paste following code over there,.....

When you run this job you get all data source which is used in CustTable Form

static void AllDataSourcesInForm(Args _args)
{
Args args = new Args();
FormRun fr;
FormBuildDataSource formBuildDataSource;
counter i;
;
args.name("CustTable"); // its your FORM name
fr = ClassFactory.formRunClass(args);
for(i=1 ; i<=fr.form().dataSourceCount();i++) { formBuildDataSource = fr.form().dataSource(i); info(new DictTable(formBuildDataSource.table()).name()); } }

No comments:

Create number sequence in D365 FO

Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...