You need to sign in to do that
Don't have an account?
Suraj Makandar
How to call a batch class from another class which creates separate transaction for each call
I have a method "processResults(<Campaign ID>)" which calls batch class for bulk processing, which does API callout and after callout it does DML operation.
Now I want to call this method using scheduler (every week) to process camapigns in the org and pass camapaign Id for each call.
How I can achieve this?
A. I can not use batch class, as it will throw "Asyncexception."
B. I can not call this method twice in same trasaction as it will throw "Uncommited work pending exception".
Now I want to call this method using scheduler (every week) to process camapigns in the org and pass camapaign Id for each call.
How I can achieve this?
A. I can not use batch class, as it will throw "Asyncexception."
B. I can not call this method twice in same trasaction as it will throw "Uncommited work pending exception".