Цитата:
Сообщение от
gl00mie
That's not quite correct, it works for other field types, too, but you have to format literals in a slightly different way. E.g. string literals must be enclosed in double quotes and dates must be formatted in X++ way (yyyy\mm\dd).
Hi, I tried, but without result:
Query q = new Query();
QueryBuildDataSource qbds;
QueryRun qr;
QueryBuildRange qbr;
CustTable custTable;
;
qbds = q.addDataSource(tablenum(CustTable));
qbr = SysQuery::findOrCreateRange(qbds, fieldnum(CustTable, AccountNum));
qbr.value(strfmt('((%1 == %2) || (%3 == %4))',
fieldStr(CustTable, AccountNum),"000015",
fieldStr(CustTable, InvoiceAccount),"000023"));
qr = new QueryRun(q);
if (qr.prompt())
{
while (qr.next())
{
custTable = qr.get(tablenum(CustTable));
info(strfmt("AccountNum: %1; InvoiceAccount: %2", custTable.AccountNum, custTable.InvoiceAccount));
}
}