- QueryBuildDataSource qbdsInventTrans;
- QueryBuildDataSource qbdsinventDim;
- QueryBuildDataSource qbdsInventBatch;
- query = new Query();
- qbdsInventTrans = query.addDataSource(tableNum(InventTrans));
- qbdsinventDim = qbdsInventTrans.addDataSource(tableNum(InventDim));
- qbdsinventDim.relations(false);
- qbdsinventDim.fetchMode(JoinMode::InnerJoin);
- qbdsinventDim.addLink(fieldNum(InventTrans,inventDimId),fieldNum(InventDim,InventDimId));
- qbdsInventBatch = qbdsinventDim.addDataSource(tableNum(InventBatch));
- qbdsInventBatch.relations(false);
- qbdsInventBatch.fetchMode(JoinMode::InnerJoin);
- qbdsInventBatch.addLink(fieldNum(InventDim,inventBatchId),fieldNum(InventBatch,inventBatchId));
- qbdsInventBatch.addLink(fieldNum(InventTrans,ItemId),fieldNum(InventBatch,itemId),qbdsInventTrans.name());
- qr = new QueryRun(query);
- info(strFmt(qr.toString()));
If we wont specify the parameter we get an error as shown below.
No comments:
Post a Comment