Avoid using function SObjectType.getDescribe in FLS checks

Impact area

Performance

Severity

Low

Affected element

Apex Class

Rule ID

SF-0199

Impact

From API version 44 the use of the function describeSObject() impacts the performance.

Remediation

For FLS checks use the option SObjectDescribeOptions.DEFERRED in the call to load lazily the information.

Time to fix

5 min

What's here


Related content

Apex Class rules

Apex Class best practices




Last modified on Nov 24, 2022