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
pk1772pk1772 

@future method not getting called from catch block

I am calling a webservice (synchronous) and in case of CalloutException, I'm trying to create an error log in a custom object. The problem is, the record insertion is happening in a future method and after an exception has encountered, the method is not getting called. In case, I remove the @future annotation, the record does not get committed to the database. Has anyone faced similar issue and is there any workaround?
anivesh muppaanivesh muppa

Hi pk,

Can you expose your code so that where is the exact cause of your failure?

Thank You. 

Raj VakatiRaj Vakati
Can u share the code ?