I have a scheduled job that executes a batch process that clones some opportunity records. When the records are inserted, it fires triggers on the opportunity that calls a future method, which throws the Future method cannot be called from a future or batch method
. I could bypass the error by check if(!isBatch()){...
However, I need the trigger code to run and the method has to run async. What options are there to overcome the error and still have the future method run?
@future
.