You need to sign in to do that
Don't have an account?
rikhil
You have uncommitted work pending. Please commit or rollback before calling out
hi all,
am making webservice callout through batch apex and its working fine with the response am doing dml operations also. but the problem is it only working with scope parameter 1 when given database.executebatch(batchinstance,10) its not working means its updating only one record when ichecked in debug logs i found this error "System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out"
is any one gone into similar situations?
thanks
Here is the trick.
You have to make all the callouts before doing any DML.
So
This is Allowed : Callout --> DML
Not Allowed : DML --> Callout
Not Allowed : Callout --> DML ----> Callout