Avoid using DML operations in Apex class constructor/init method
Impact area
Security
Severity
High
Affected element
Apex Class
Rule ID
SF-0023
Impact
Using DML statements in constructors can result in data modification just by accessing a page.
Remediation
Remove DML code from constructors / init methods.
Time to fix
60 min