function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Manogna DemoManogna Demo 

how to make callouts from triggers from future method, any reference code

please do needful,
thanks
agrawal mukulagrawal mukul
Hi manogna,

Below is sample code to callout from triggers by using a future method :

Trigger ContactTrigger on Contact(After insert,After update,after undelete)
{   
   
   for(Contact Con=Trigger.new)
   {
     Util.CallOutMethod(Con.AccountId);
   }
}


public class Util(){
  @future(callout=true)
   public void CallOutMethod(string AccountId)
   {   
     //Write Callout code
   }

}

Please let me know if you need more information?

Thanks,
Mukul
Njkwqp BhqkdfNjkwqp Bhqkdf
We research and write about area codes and many more authentic information about angel numbers (https://eightyreviews.com/angel-number-3/).
you may read here>> eightyreviews.com (https://eightyreviews.com/).
Amory ManeraAmory Manera
Hey thanks for the super helpful reply. I'm not sure how I missed that thread. I haven't quite mastered the search function on here. The Information you shared above is great. I have been reading all you shared here. In this you explained everything very well. Thanks I am going to bookmark this https://developer.salesforce.com/forums/?id=9062I000000Blk0QAC. if you are interested in playing Florida Lottery Results then Check Results And Details Here>> https://floridaloteryresults.com/.