Salesforce Certified Platform Developer I - CRT-450 Exam Practice Test

A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. public class without sharing OpportunityService( public static List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds){ List<OpportunitylineItem> oppLineItems = new List<OpportunityLineItem>(); for(Id thisOppId:
opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId
= :thisOppId)]; } return oppLineItems; } }
The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?
Correct Answer: A Vote an answer
Which three Salesforce resources can be accessed from a Lightning web component? Choose 3 answers
Correct Answer: B,D,E Vote an answer
What can be easily developed using the Lightning Component framework?
Correct Answer: D Vote an answer
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
Correct Answer: B,D Vote an answer
A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing.
What is the first step towards troubleshooting the issue?
Correct Answer: C Vote an answer
Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the maste object, Job _Application__c acting as the detail.
Within the Job ___c object, a custom multi-select picklist, preferred Locations __c, contains a list of approved states for the position. Each Job_Application__c record relates to a Contact within the system through a master-detail relationship.
Recruiters have requested the ability to view whether the Contact's Mailing State value matches a value selected on the Preferred_Locations__c field, within the Job_Application__c record. Recruiters would like this value to be kept in sync if changes occur to the Contact's Mailing State.
What is the recommended tool a developer should use to meet the business requirement?
Correct Answer: B Vote an answer
When a user edits the postal Code on an Account, a custom Account text field named. Timezone` must be updated based on the values in a PostalCodeToTimezone_c custom ogject. Which two automationtools can be used to implement this feature? Choose 2 answers
Correct Answer: A,B Vote an answer
While developing an Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the developer ensure only records accessible to the currently logged in user are displayed?
Correct Answer: D Vote an answer
Which two are best practices when it comes to component and application event handling?
(Choose two.)
Correct Answer: B,C Vote an answer
How should a developer write unit tests for a private method in an Apex class?
Correct Answer: C Vote an answer
Which three data types can a SOQL query return? Choose 3 answers
Correct Answer: A,D,E Vote an answer
A company has a custom object, Order__c, that has a required, unique external ID field called OrderNumber__c.
Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of order__c records using the external ID field?
Correct Answer: A Vote an answer
In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?
Correct Answer: A Vote an answer