Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.
1 vote

Knowing if a future call is allowed

You can use Quiddity enum to work out the context, for example: Quiddity quiddity = Request.getCurrent().getQuiddity(); if (quiddity == Quiddity.VF || quiddity == Quiddity.BATCH_APEX) { ...
user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible