General X++ Development

How do I create an outer join using QueryBuildDataSource?

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

How do I create an outer join using QueryBuildDataSource?

SSunny Vasty75 reputation · answered Aug 13, 2026

Set the datasource join mode to OuterJoin.

X++
salesDs.joinMode(JoinMode::OuterJoin);

The rest of the query is built the same way as an inner join. The difference is that the parent record can still come back when there is no matching child record.