QueryRun could not be created in sysoperation framework

class CustBalanceService
    LogisticsAddressCountryRegionId countryRegionId;
    SalesTable salesTable;
    public void processData(CustBalanceDataContract _custBalanceDataContract)
        QueryRun queryRun;
        CustTable custTable;
        //create a new queryrun object
        queryRun = new queryRun(queryStr(QueryAccountNum));
        // loop all results from the query
        while (queryRun.next())
            salesTable = queryRun.get(tablenum(SalesTable));
            custTable = salesTable.custTable_CustAccount();
            if(custTable.countryRegionId() == countryRegionId)
                select forUpdate salesTable
                       join Custtable
                         where salesTable.CustAccount == custTable.AccountNum;
                salesTable.IDNar = custTable.idNar;


what’s wrong with this code?

What problem do you have with your code? Please realize that we can’t help you if you don’t describe your problem.

By the way, I see you still haven’t fixed the bug with countryRegionId. It will be always empty, because you never any value into the variable. If you want only customers without any country/region ID, add the range to the query. But I suspect you wanted some logic and forgot to implement it.