+ Start a Discussion
PekPek 

Trigger using @future example

I have a trigger which needs to query more than 1000 records. I would like to convert it to use @future in order to work around the governor limit.

 

Do I have to move the logic out of the trigger to a class?

Do you have an example of how I would use @future in this case?

 

Thanks

Pierre

ascuccimarraascuccimarra

I don't think moving this to a future method would help. Future methods run async, but don't increase limits.

I think what should help you is batch apex, that way you can do batch processing for every 1000 records. 

Hope this helps.