General X++ Development

What is the difference between `queryValue()` and `SysQuery::value()`?

Asked by Sunny Vasty· Aug 13, 2026· 1 answers

What is the difference between queryValue() and SysQuery::value()?

SSunny Vasty75 reputation · answered Aug 13, 2026

For normal day-to-day range values, both are commonly used to format a value correctly for a query range.

X++
range.value(queryValue('US-001'));

and:

X++
range.value(SysQuery::value('US-001'));

solve the same basic problem.

I normally use whichever style is already consistent in the codebase I am working in. There is no benefit in mixing both styles in the same class just for the sake of it.