relationship between two table in x++

i want to relate two tables in ax:

  • ConditionValidation
  • TMpFrmVirtual

with this code, after debugging i can't see the relation between them:

Query query = new Query();
QueryBuildDataSource    qdbs;

qdbs    = query.addDataSource(tableNum(ConditionValidation));

qdbs    = qdbs.addDataSource(tableNum(TmpFrmVirtual));

qdbs.joinMode(JoinMode::ExistsJoin);

qdbs.relations(true);

qdbs.addLink(fieldNum(ConditionValidation, RecId), fieldNum(TmpFrmVirtual, RefRecId));
QueryRun qr = new QueryRun(query);

what's wrong with this code?

Parents Reply Children
No Data
Related
Recommended