Skip to content

DML In Loop / SOQL Query In Loop Improvement

Choose a tag to compare

@RubenHalman RubenHalman released this 24 Nov 19:42
· 772 commits to master since this release
639088b

Release Note: DMLStatementInLoop Rule Enhancements

We're happy to announce significant enhancements to the DMLStatementInLoop rule in this release. These updates aim to boost accuracy in identifying DML statements within loops, including nested structures. Notably, the rule has been divided into two separate components: DMLStatementInLoop and SOQLQueryInLoop.

Changes:

  1. DMLStatementInLoop Rule:

    • The rule has undergone refinement to enhance accuracy in identifying DML statements within loops.
    • The traversal logic has been improved to account for nested loops, ensuring precise detection of DML statements within these structures.
    • To enhance maintainability, the rule has been split into a separate class.
  2. SOQLQueryInLoop Rule:

    • Introducing a new rule, SOQLQueryInLoop, which identifies instances of SOQL queries executed inside loops. This addition promotes best practices and aids in optimizing code for governor limits.
  3. Flow Compiler Class:

    • A new class, the Flow Compiler, has been introduced to elevate the capabilities of our rule-checking process. This addition allows for more sophisticated and uniform analyses of Salesforce flows.

We believe that these changes significantly enhance the functionality and accuracy of the DMLStatementInLoop rule, providing users with a more powerful tool for identifying potential issues related to DML statements and SOQL queries in loops. As always, we remain committed to providing tools that empower Salesforce developers to create high-quality and efficient Flow solutions.

As always, we appreciate your feedback. Feel free to reach out if you have any questions or suggestions.

Thank you for using our product!