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
KaityKaity 

Can we make Apex SOAP callout in a synchronous manner

Hi,
Can someone explain, can we make Apex SOAP callout in a synchronous manner? My understanding was- whenever we make APEX SOAP callout, we need to do with @future, which is asynchronous.

-Kaity
Best Answer chosen by James Loghry
pconpcon
You can make an Apex SOAP callout synchronously, but only from certiain "starting" locations.  For example, any callouts made from during a trigger's lifespan must be made with an @future.  Callouts from VisualForce controllers and WebService methods can be made without the @future annotation.

For more information see the Important Considerations section of this article [1]

[1] https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts