|
06.11.2012, 15:11 | #1 |
Участник
|
Malaysia: Building a query object
Источник: http://axmas.blogspot.com/2012/11/bu...ry-object.html
============== class ProjTableQuery { } static void main(Args _args) { Query query; QueryBuildDataSource qbds1; QueryBuildDataSource qbds2; QueryBuildRange qbr1; QueryBuildRange qbr2; QueryRun queryRun; ProjTable projTable; ; query = new Query(); qbds1 = query.addDataSource(tableNum(ProjTable)); qbds1.addSortField(fieldNum(ProjTable, Name), SortOrder::Ascending); qbr1 = qbds1.addRange(fieldNum(ProjTable,Type)); qbr1.value(queryValue(ProjType::FixedPrice)); qbr2 = qbds1.addRange(fieldNum(ProjTable,ProjId)); qbr2.value(queryValue('2') + '*'); qbds2 = qbds1.addDataSource(tableNum(ProjEmplTrans)); qbds2.relations(true); qbds2.joinMode(JoinMode::ExistsJoin); queryRun = new QueryRun(query); while (queryRun.next()) { projTable = queryRun.get(tableNum(ProjTable)); info(strFmt( "%1, %2, %3", projTable.ProjId, projTable.Name, projTable.Type)); } } Источник: http://axmas.blogspot.com/2012/11/bu...ry-object.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|