最新的Salesforce Platform Developer I (PDI) - PDI免費考試真題
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:
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?
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?
正確答案: A,B
說明:(僅 Fast2test 成員可見)
A developer wants to mark each Account in a List < Account > as either Active or Inactive, based on the value in the LastModifiedDate field of each Account being greater than 90 days in the past.
Which Apex technique should the developer use?
Which Apex technique should the developer use?
正確答案: B
說明:(僅 Fast2test 成員可見)
How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?
正確答案: B
說明:(僅 Fast2test 成員可見)
A developer needs to confirm that a Contact trigger works correctly without changing the organization ' s data.
What should the developer do to test the Contact trigger?
What should the developer do to test the Contact trigger?
正確答案: C
說明:(僅 Fast2test 成員可見)
A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org.
Which tool should the developer use to troubleshoot query performance?
Which tool should the developer use to troubleshoot query performance?
正確答案: A
說明:(僅 Fast2test 成員可見)
Which two settings must be defined in order to update a record of a junction object?
正確答案: B,D
說明:(僅 Fast2test 成員可見)
A lead developer creates a virtual class called " OrderRequest " . Consider the following code snippet:
public class CustomerOrder{
//code implementation
}
How can a developer use the OrderRequest class within the CustomerOrder class?
public class CustomerOrder{
//code implementation
}
How can a developer use the OrderRequest class within the CustomerOrder class?
正確答案: B
說明:(僅 Fast2test 成員可見)
A PrimaryId_c custom field exists on the Candidate_c custom object. The field is used to store each candidate ' s id number and is marked as Unique in the schema definition.
As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate ' s primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.
Which technique should the developer implement to streamline the data upload?
As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate ' s primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.
Which technique should the developer implement to streamline the data upload?
正確答案: A
說明:(僅 Fast2test 成員可見)
A custom object Trainer_c has a lookup field to another custom object Gym_c. Which SOQL query will get the record for the Viridian City Gym and all its trainers?
正確答案: A
說明:(僅 Fast2test 成員可見)
If Apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits?
正確答案: B,D
說明:(僅 Fast2test 成員可見)
Universal Containers has a large number of custom applications that were built using a third-party JavaScript framework and exposed using Visualforce pages. The company wants to update these applications to apply styling that resembles the look and feel of Lightning Experience.
What should the developer do to fulfill the business request in the quickest and most effective manner?
What should the developer do to fulfill the business request in the quickest and most effective manner?
正確答案: B
說明:(僅 Fast2test 成員可見)
A developer creates a custom exception as shown below:
public class ParityException extends Exception {}
What are two ways the developer can fire the exception in Apex?
public class ParityException extends Exception {}
What are two ways the developer can fire the exception in Apex?
正確答案: A,B
說明:(僅 Fast2test 成員可見)