Salesforce Platform Developer I (legacy) — Question 172

Which two statements are true about Apex code executed in Anonymous Blocks? (Choose two.)

Answer options

Correct answer: B, E

Explanation

The correct answers are B and E because Apex code in Anonymous Blocks runs with the permissions of the logged-in user and successful DML operations are committed automatically. Options A and C are incorrect as they do not apply when executing in Anonymous Blocks, while D is false because DML operations are not rolled back unless specifically coded to do so.