I have a query running for batch invoicing and with some combinaison range and sort ,it never pass the initialisation.
So I was wondering if we can select the fields we want in a queryRun in a hope that this could help out…
Thanks.
SysQueryRun chooseLines;
You can select individual fields with the help of QueryBuildDataSource.addSelectionField().
I found something else:
chooseLines.query().dataSourceNo(1).fields().dynamic(false);
chooseLines.query().dataSourceNo(2).fields().dynamic(false);
chooseLines.query().dataSourceNo(1).fields().clearFieldList();
chooseLines.query().dataSourceNo(2).fields().clearFieldList();
chooseLines.query().dataSourceNo(1).fields().addField(fieldnum(salestable, recid));
chooseLines.query().dataSourceNo(2).fields().addField(fieldnum(salesline, recid));
Is it the same thing?
Is it really faster to ask here instead of actually trying it? Yes, it’s the same. When you add a selection field, a static field list is used (otherwise it wouldn’t have any effect).