I would like to check if Credit Memos or Prepayments exists when loading an Invoice. How programmatically incorrect is it to query the database on RowSelected? (I know you’re not supposed to make changes in RowSelected).
Solved
How bad is running queries in RowSelected?
Best answer by Shawn Burt
I think its preferential to do it in RowSelecting. It will depend on what you are doing with the results.
If you are changing things like enabled or visibility you may need to create an unbound extension so you can set a flag to be used in RowSelected. This would limit the number of times you are running that query.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.