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 

error for Ouath 2.O

Hello,

I have below code wheni try to get acccess token from Ouath 2.O
 
"common.apex.runtime.impl.ExecutionException: You have uncommitted work pending. Please commit or rollback before calling out"|

Can someone guide me ?
Best Answer chosen by Ab
Deepali KulshresthaDeepali Kulshrestha
Hi Sandrine,

Please refer link below for more information:
https://developer.salesforce.com/forums/?id=906F000000091q1IAA
https://stackoverflow.com/questions/9417253/salesforce-error-while-makin-a-call-to-a-web-service-api
https://www.example-code.com/java/salesforce_oauth2_access_token.asp

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
Deepali Kulshrestha