You need to sign in to do that
Don't have an account?

SELECT query limit
Hello,
I am writing an APEX trigger in which I am making a simple SELECT query and bulk-deleting the records thus obtained using delete <List>. When this trigger runs on a bulk operation, I am constantly getting a result exceeded error (> 21); what are the limits governing APEX code if at all there's one?
Thanks
This is normally caused by having a query within a loop. You will need to move your query outside of any loop and then manipulate the query results within the loop to prevent too many queries happening when doing an action.