Performing a DML operation on page load in Salesforce is generally not recommended due to security and performance concerns. However, if it's necessary for a specific use case, you must thoroughly justify and document it for the security review. Here's how:
1. **Business Use Case**: Provide a detailed explanation of why the DML operation on page load is required.
2. **Mitigation Measures**: Describe measures to prevent abuse, such as requiring user interaction (e.g., a button click) before executing the DML operation.
3. **Permission Checks**: Confirm that the operation adheres to CRUD/FLS checks and respects user permissions.
4. **False Positive Documentation**: If applicable, include a false positive document explaining why the operation does not pose a security risk.
5. **CSRF Protection**: Enable features like "Requires CSRF protection on GET requests" to mitigate vulnerabilities.
By documenting these details, you can address potential concerns during the security review.