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
RiothamusRiothamus 

Callout fails during a trigger

Hi,

 

I'm using triggers to call a Web Service to lookup an address every time the address changes, but I get the error:

 

System.CalloutException Callout from triggers are currently not supported.(line 124)

 

 

Line 124 is sending the HttpRequest. Is there a work-around?

 

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

You can use a @future method to retrieve the data later. As it says, you can't use callouts during a trigger.

All Answers

sfdcfoxsfdcfox

You can use a @future method to retrieve the data later. As it says, you can't use callouts during a trigger.

This was selected as the best answer
RiothamusRiothamus

Worked great, thanks!