• jagjays
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hi,

Iam new to apex and managed to write a batch apex class. We have an object <object1> and we have a trigger on 'after update' event on that object. This trigger invoke one @future method.

In my batch apex Iam updating a field on <object1> and calling the update operation on that object. I get a system exception "System.AsyncException: Future method cannot be called from a future method:". I read through various posting and found that we cannot invoke a future method from the batch apex because of the async behavior.

I cannot remove the @future from my trigger, is there any way I can get this to work? If batch apex is not the route to be taken, what would be my other alternative to schedule a apex class to update the field on the object.

I appreciate your help

JP.

Hi,

Iam new to apex and managed to write a batch apex class. We have an object <object1> and we have a trigger on 'after update' event on that object. This trigger invoke one @future method.

In my batch apex Iam updating a field on <object1> and calling the update operation on that object. I get a system exception "System.AsyncException: Future method cannot be called from a future method:". I read through various posting and found that we cannot invoke a future method from the batch apex because of the async behavior.

I cannot remove the @future from my trigger, is there any way I can get this to work? If batch apex is not the route to be taken, what would be my other alternative to schedule a apex class to update the field on the object.

I appreciate your help

JP.