27 Ağustos 2015 Perşembe

AXAPTA - Save query to a table field and restore than

I used Mirko Bonello's blog for this sample.

Create a container field at table. Mine is InventTableQuery:

void createAndSaveQueryInTable()
{
  QueryRun SysqueryRun;
  ;
  if (this.InventTableQuery)
      queryRun = new QueryRun(this.InventTableQuery);
  else
      queryRun = new QueryRun(queryStr('InventTable'));

   qrun.promptLoadLastUsedQuery(false);
   if (queryRun.prompt())
      this.InventTableQuery = queryRun.pack();
}


We used SysQueryRun instead for QueryRun and set qrun.promptLoasLastUsedQuery(false) for don't screw like me because of "Why I get same query values for every record?" question... :)

Hiç yorum yok:

Yorum Gönder