---
title: Avoid invocation of future methods inside loops
description: "**Impact area** Performance **Severity** High **Affected element** Apex Class ## Rule ID **SF-AVOID-FUTURE-IN-LOOP** ## Impact Invoke a future method inside a loop can raise a governor limit exception. ## Remediation Build up a collection of all requests that need to…"
url: "https://community-staging.qualityclouds.com/qcdocs/qc/salesforce-rules/avoid-invocation-of-future-methods-inside-loops/"
updated: "2025-03-21"
category: Rules
---

# Avoid invocation of future methods inside loops

**Impact area**

Performance

**Severity**

High

**Affected element**

Apex Class

## Rule ID

**SF-AVOID-FUTURE-IN-LOOP**

## Impact

Invoke a future method inside a loop can raise a governor limit exception.

## Remediation

Build up a collection of all requests that need to be made and pass it off in a single call to the future method.

### Time to fix 

45 min
