Salesforce Certified Platform Developer II — Question 127

Which statement is true regarding the use of user input as part of a dynamic SOQL query?

Answer options

Correct answer: C

Explanation

The correct answer is C because escaping quotes is essential for preventing SOQL injection attacks. Option A is incorrect because some user input may be necessary; B is misleading as String.format() does not prevent injection; D does not directly address injection concerns, making it less relevant.