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
Dave Berry 9Dave Berry 9 

SBQQ__ContractService: SBQQ,QuoteAfter: ... System.CalloutException: Callout from triggers are currently not supported.

Hello!

I am developing automation to create SBQQ quotes and opportunities in order to eventually create contracts, etc... One step of the automation tries to contract the opportunity. When calling, I notice that I am getting the following error. The contract is produced but I am not getting a renewal opportunity created. Any help would be greatly appreciated.

Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, SBQQ.QuoteAfter: execution of AfterUpdate

caused by: System.CalloutException: Callout from triggers are currently not supported.

(SBQQ)

We see this error in the Apex Jobs status detail for the apex class SBQQ ContractService. Does anyone know what is failing and why?

Update, if we reduce the batch size to 1, this error doesn't occur.
PawanKumarPawanKumar
This is an obvious error as this is one of the limitations in salesforce. To overcome this, you need to annotate your method with @future then this error will disappear. 

Assuming your logic is in MyClass and myMethod has all your callout logic.
global class MyClass {
@future Public static void myMethod(String a) {
//long-running Apex code
 }
}

-------
You can refer the details in salesforce knowledge blog here.
https://help.salesforce.com/articleView?id=000176570&type=1

Please mark it best if it helps you. Thanks.
Dave Berry 9Dave Berry 9
@PawanKumar This is not my code that is getting this error. It is Salesforce SBQQ code. All my code does is set the contracted flag and update the opportunity.
Nazrul AminNazrul Amin
Hi Dave, I am having a similar issue, but error is being thrown from QuoteLine.  Did you manage to resolve this in the end please?

Thanks,
Nazrul