QueryRun Class -> Stack Trace Error (AX2012)

Hi!

please help. thx!!

I try to execute an existing query with a job. I recreated the following example i found on msdn:

msdn.microsoft.com/…/gg923354.aspx

static void example() 
{ 
    // Create a QueryRun object from a query stored in the AOT. 
    QueryRun qr = new QueryRun ("Customer"); 
    CustTable customerRecord; 
 
    // Display a window enabling the user to choose which records to print. 
    if (qr.prompt()) 
    { 
        // The user clicked OK. 
        while (qr.next()) 
        { 
            // Get the fetched record. 
            CustomerRecord = qr.GetNo(1); 
 
            // Do something with it 
 
            print CustomerRecord.AccountNum; 
        } 
    } 
    else 
    { 
        // The user pressed Cancel, so do nothing. 
    } 
}
but i get an error message (see screenshot)
Stack Trace Error

![8053.12-18-2012 9-49-06 AM.jpg|953x564](upload://wU0LbYFEVhoinTsXvLpWtsy9Z7G.jpeg)

Never mind… typo error. Query “customer” does not exist. It must be “Cust” (fore example)