class SalesListItems
{
QueryRun queryRun;
}
Methods
static void main(Args _args)
{
SalesListItems salesListItems = new SalesListItems();
salesListItems.run();
}
private void run()
{
this.buildQuery();
if (queryRun.prompt())
this.listItems();
}
private void listItems()
{
SalesLine salesLine;
while (queryRun.next())
{
salesLine = queryRun.get(tableNum(SalesLine));
info(strFmt("%1 %2",salesLine.ItemId,salesLine.itemName()));
}
}
private void buildQuery()
{
Query query;
QueryBuildDataSource dataSource;
query = new query();
dataSource = query.addDataSource(tableNum(SalesLine));
query.addQueryFilter(dataSource, fieldStr(SalesLine,SalesId));
queryRun = new QueryRun(query);
}
{
QueryRun queryRun;
}
Methods
static void main(Args _args)
{
SalesListItems salesListItems = new SalesListItems();
salesListItems.run();
}
private void run()
{
this.buildQuery();
if (queryRun.prompt())
this.listItems();
}
private void listItems()
{
SalesLine salesLine;
while (queryRun.next())
{
salesLine = queryRun.get(tableNum(SalesLine));
info(strFmt("%1 %2",salesLine.ItemId,salesLine.itemName()));
}
}
private void buildQuery()
{
Query query;
QueryBuildDataSource dataSource;
query = new query();
dataSource = query.addDataSource(tableNum(SalesLine));
query.addQueryFilter(dataSource, fieldStr(SalesLine,SalesId));
queryRun = new QueryRun(query);
}
No comments:
Post a Comment