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
AbAb 

Restriction of using API, DML and SOQL operatiosn all at same time

Hello,

What are the restriction of calling mulltiple webservice in single apex class and if i want to make update/insert in salesforce at sames time.

Thanks for suggestion
 
Best Answer chosen by Ab
Raj VakatiRaj Vakati
You might face the below governor limits 
  1. Total stack depth for any Apex invocation that recursively fires triggers due to insert, update, or delete statements 
  2. Maximum cumulative timeout for all callouts (HTTP requests or Web services calls) in a transaction
  3. Total heap size
  4. Maximum CPU time on the Salesforce servers

Other Salesforce related errors 


I can suggest making them as a discrete transaction instead of doing in the same call