Avoid Sosl Calls Within Loops

< 1 min read

Impact Area

Manageability

Severity

Medium

Affected Element

Apex  Class

 Rule ID #

SF-0042

Impact #

Sosl (Salesforce object search language) queries within loops can cause governor limit exceptions.

Remediation #

Remove the Sosl statements from within the loop.

Time to fix #

60 min

Updated on March 21, 2025
Was it helpful ?