Ax 2012: Some useful SysQuery Class methods

Instead of direct assignment of the values to the query build range value, we can use SysQuery class methods to avoid the errors of datatype conversion. So here in this post I gave some useful methods.

QueryBuildRange qbr;

*   For setting range value we usually use like this

qbr.value(“Our Value”);

qbr.value(queryValue(“Our Value”));

*   For setting range value using SysQuery

qbr.value(SysQuery::value(“Our Value”));

qbr.value(SysQuery::valueLike(“Our Value”));

qbr.value(SysQuery::valueNot(“Our Value”));

*   For logical NOT

qbr.value(SysQuery::valueNot(“Our Value”));

*   For retrive all records

in usual way we can give like empty (” “) but using sysquery class


*   For retrive Null records


*   For retrive Not Null records


*   For giving range

usually we add qbr.value(fromDate,toDate) but using sysQuery


The method will add the dots (‘..’)  like this

*   For finding total number of records available in the resulting query

*   For finding total number of Datasource available in the resulting query


*  For Datasource and Range creation






I hope it is usefull…:-)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s