Bojensen Blogs

Displaying and Saving a Query

Sometimes it might be useful to display a query you have created in the AOT to the user. After this the user makes changes to the query (adds ranges and sort fields) and you would like to save the query (as changed by the user) to a table in the database, therefore saving the state of the query as modified by the user. Then you can re-use the query later by retreiving it from the table.

To do this you need to:

1. Create a field in your table of type container;
2. Create the query, you want to initially display to the user, as usual from the AOT;
3. Use the following code:

Now, to retrieve the saved query from the table, for some other use, is equally simple:

Originally Posted on: http://dynamicsax-dev.blogspot.dk/2008/10/displaying-and-saving-query.html

Comments are closed.