PDI Exam Question 76

A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system.
Whithin the class, the developer identifies the following method as a security threat: List<Contact> performSearch(String lastName){ return Database.query('Select Id, FirstName, LastName FROM Contact WHERE LastName Like %'+lastName+'%); } What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2 answers
  • PDI Exam Question 77

    Potential home buyers working with a real estate company can make offers on multiple properties that are listed with the real estate company. Offer amounts can be modified; however, the property that has the offer cannot be modified after the offer is placed. What should be done to associate offers with properties in the schema for the organization?
  • PDI Exam Question 78

    Universal Containers stores the availability date on each Line Item of an Order and Orders are only shipped when all of the Line Items are available. Which method should be used to calculate the estimated ship date for an Order?
  • PDI Exam Question 79

    The account object has a custom percent field, rating, defined with a length of 2 with 0 decimal places. An account record has the value of 50% in its rating field and is processed in the apex code below after being retrieved from the database with SOQL public void processaccount(){ decimal acctscore = acc.rating__c *
    100; } what is the value of acctscore after this code executes?
  • PDI Exam Question 80

    How many Accounts will be inserted by the following block of code?