PDI Exam Questions

Total 236 Questions

Last Updated Exam : 22-Oct-2024

A developer has identified a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the datadase. Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits? Choose 2 answers


A. Use partial DML statements to ensure only valid data is committed.


B. Use the System,Limit classto monitor the current CPU governor limit consumption.


C. Use the Database,Savepoint method to enforce database integrity.


D. Use the Reedonly annotation to bypass the number of rows returned by a SOQL.





B.
  Use the System,Limit classto monitor the current CPU governor limit consumption.

C.
  Use the Database,Savepoint method to enforce database integrity.

What should a developer do to check the code coverage of a class after running all tests?


A. View the Code Coverage column in the list view on the Apex Classes page.


B. View the Class Test Percentage tab on the Apex Class fist view m Salesforce Setup.


C. View Use cede coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab.


D. Select and run the class on the Apex Test Execution page in the Developer Console.





B.
  View the Class Test Percentage tab on the Apex Class fist view m Salesforce Setup.

A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message 'Maximum trigger depth exceeded’, What could be the possible causes?


A. The developer does not have the correct user permission.


B. The trigger is getting executed multiple times.


C. The trigger is a a helper class.


D. The trigger does not have sufficient code coverage.





B.
  The trigger is getting executed multiple times.

What should be used to create scratch orgs?


A. Developer Console


B. Salesforce CLI


C. Workbench


D. Sandbox refresh





B.
  Salesforce CLI

Universal Containers has 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?


A. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications.


B. Rewrite all Visualforce pages asLightning components.


C. Set the attribute enableLightning to true in the definition.


D. Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce pages used by the custom application.





A.
  Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications.

Which action causes a before trigger to fire by default for Accounts?


A. Renaming or replacing picklist


B. Importing data using the Data Loader and the Bulk API


C. Converting Leads to Contact accounts


D. Updating addresses using the Mass Address update tool





B.
  Importing data using the Data Loader and the Bulk API

A develop completed modification to a customized feature that is comprised of two elements:

Apex trigger Trigger handler Apex class

What are two factors that the developer must take into account to properly deploy the modification to the production environment?


A. Apex classes must have at least 75% code coverage org-wide.


B. At least one line of code must be executed for the Apex trigger.


C. All methods in the test classes must use @isTest.


D. Test methods must be declared with the testMethod keyword.





A.
  Apex classes must have at least 75% code coverage org-wide.

B.
  At least one line of code must be executed for the Apex trigger.

How can a developer check the test coverage of active Process Builder and Flows deploying them in a Changing Set?


A. Use the Flow properties page.


B. Use the code Coverage Setup page


C. Use the Apex testresult class


D. Use SOQL and the Tooling API





D.
  Use SOQL and the Tooling API

A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank. Which automation allows the developer to satisfy this requirement in the most efficient manner?


A. A record trigger flow on the Opportunity object


B. An Apex trigger on the Opportunity object


C. approval process on the Opportunity object


D. An error condition formula on a validation rule on Opportunity





D.
  An error condition formula on a validation rule on Opportunity

A developer is writing tests for a class and needs to insert records to validate functionality. Which annotation method should be used to create record for every method in the test class?


A. @isTest (SeeAllData-true)


B. @FreTest


C. @TestSetup


D. @StartTest





C.
  @TestSetup


Page 9 out of 24 Pages
Previous