How should one prevent soql injection when using dynamic soql?

How should one prevent soql injection when using dynamic soql?

Question:

How should one prevent soql injection when using dynamic soql?

Options:

Database class method

code contained in a trigger

Utilize the String.escapeSingleQuotes(string) method

with sharing keyword

Correct Answer

The Correct Answer for this Question is

Utilize the String.escapeSingleQuotes(string) method

Leave a Comment