Salesforce

An effort to bring a revolution in Salesforce.

Thursday, 26 October 2017

Future method cannot be called from a future or batch method: Error

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY

System.AsyncException: Future method cannot be called from a future.

System.AsyncException: Future method cannot be called from a future or batch method


You need to check if the trigger is being fired from the future method, add the below line as your first line of trigger.

    if(system.isFuture() || System.isBatch()) return;

, , , ,

Get Gmail, Docs, Drive, and Calendar for business