General X++ Development

How do I use `notexists join` in X++?

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

How do I use notexists join in X++?

SSunny Vasty75 reputation · answered Aug 13, 2026

Use notexists join when you want records that do not have a related record.

X++
CustTable  custTable;
SalesTable salesTable;

while select custTable
    notexists join salesTable
        where salesTable.CustAccount == custTable.AccountNum
{
    info(custTable.AccountNum);
}

This is cleaner than selecting everything and then checking for missing related records in X++.