I want to run the R-COPEN script to automatically place a customer on hold if transactions are over due. When I open the Invoice table and look for open transactions, I only need the oldest transaction to check the date against. How can I restrict the search to finding only this transaction or is it faster just to check every transaction?
You can experiment with the "AALLOC" ordering, which will only list unpaid transactions by account. This will make your check of the database much faster.