+ Start a Discussion
vnbhargavivnbhargavi 

Asyncapexjob for trigger

hi

 

I have trigger which fires on after update ..in the trigger am making a call to an apex method of (future callout)...

 

As am running it inside the loop i can't make more than 10 apex method invocation.................

 

so how can i overcome this....????

 

I think i have to use asyncapexjob.........but how i do  can anyone help me in this??????????????/.................................................

yvk431yvk431

There is no way to call a future method like that, best way is to re-define your future method so as to process all the records which invoked the trigger in one go. See how to handle future methods in the following article :

 

http://wiki.developerforce.com/page/Apex_Code_Best_Practices

 

 

--yvk