Apex代码优化01 - 避免Too many SOQL queries: 101 情景介绍:在项目的demo期,为了快速完成任务,有时候难免在项目上写出一些性能极差的代码,比如hard code(没有遵循可配置化的思想实施),再比如在for循环里面做查询。本节我们将针对在for循环里面做查询这个主题做优化分享。 Q1:什么是query 101错误? A:通俗的讲,就是
I've recently ran into an issue where when my flow fails to get a record, I get a "too many SOQL queries" error. This is the error in a before save
Avoid using Seealldata=true if possible. It's better to just create these records from scratch in your Test Class. This is not only a good Salesforce practice, but also a good coding practice in general. Plus, you'll save on SOQL queries.(尽量避免使用 seeAlldata = ture, 这个基本属于严...