Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam CRT-450 Topic 6 Question 61 Discussion

Actual exam question for Salesforce's CRT-450 exam
Question #: 61
Topic #: 6
[All CRT-450 Questions]

A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Within the class, the developer identifies the following method as a security threat:

ist performSearch (String lastName} [

return Database.query('SELECT Id, FirstName, LastName FROM Contact WHERE LastName Like

s'+lastName+'s'")?;

What are two ways the developer can update the method to prevent a SOQL injection attack?

Choose 2 answers

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Levi
22 hours ago
I think the developer should use variable binding to prevent SOQL injection.
upvoted 0 times
...

Save Cancel