The Secret Of Salesforce PDI Pdf Exam

Our pass rate is high to 98.9% and the similarity percentage between our PDI study guide and real exam is 90% based on our seven-year educating experience. Do you want achievements in the Salesforce PDI exam in just one try? I am currently studying for the Salesforce PDI exam. Latest Salesforce PDI Test exam practice questions and answers, Try Salesforce PDI Brain Dumps First.

Free PDI Demo Online For Salesforce Certifitcation:

NEW QUESTION 1

A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown. What step should the developer take to resolve the issue and properly test the exception?

  • A. Use Test.isRunningTest() within the customer controller.
  • B. Use database methods with all or none set to FALSE.
  • C. Use the finally block within the unit test to populate the exception.
  • D. Use try/catch within the unit test to catch the exception.

Answer: D

NEW QUESTION 2

A developer uses a test setup method to create an account named 'test'. The first method deletes the account record. What must be done in the second test method to use the account?

  • A. Use select id from account where name='test'
  • B. Restore the account using an undelete statement
  • C. Call the test setup method at the start of the test
  • D. The account cannot be used in the second method

Answer: A

NEW QUESTION 3

A developer needs to create a custom Visualforce button for the Opportunity object page layout that will cause a web service to be called and redirect the user to a new page when clicked. Which three attributes need to be defined in the <apex:page> tag of the Visualforce page to enable this functionality? Choose three answers.

  • A. StandardController
  • B. Extensions
  • C. Action
  • D. Controller

Answer: ABC

NEW QUESTION 4

Which two conditions cause workflow rules to fire? Choose 2 answers

  • A. Changing the territory assignments of accounts and opportunities
  • B. Updating records using the bulk API
  • C. Converting leads to person accounts
  • D. An Apex Batch process that changes field values

Answer: BD

NEW QUESTION 5

A developer uses an 'after update' trigger on the Account object to update all the Contacts related to the Account. The trigger code shown below is randomly failing.
List<Contacts> theContacts = new List<Contacts>(); for(Account a : Trigger.new){ for(Contact c : [SELECT Id, Account_Date_c FROM Contact WHERE AccountId = :a.Id]){ c.Account_Date_c = Date.today(); theContacts.add(c);
}
} updates theContacts;
Which line of code is causing the code block to fail?

  • A. An exception is thrown if theContacts is empty
  • B. The trigger processes more than 200 records in the for loop.
  • C. An exception is thrown if Account_Date_c is null.
  • D. A SOQL query is located inside of the for loop.

Answer: D

NEW QUESTION 6

A developer runs the following anonymous code block in a Salesforce org with 100 accounts List acc= {select id from account limit 10}; delete acc; database.emptyrecyclebin(acc); system.debug(limits.getlimitqueries()+'
,'+Limits.getlimitDMLStatements()); What is the debug output?

  • A. 1, 2
  • B. 10, 2
  • C. 100, 150
  • D. 150, 100

Answer: C

NEW QUESTION 7

A developer declared a class as follow.
public class wysiwyg { // Properties and methods including DML }
Which invocation of a class method will obey the organization-wide defaults and sharing settings for the running user in the Salesforce Organization?

  • A. An Apex Trigger that invokes a helper method in this class
  • B. A Visualforce page with an Apex controller that invokes a method in this class
  • C. A user on an external system that has an API call into Salesforce that invokes a method in this class
  • D. A developer using the Developer Console that invokes a method in this class from the execute anonymous window

Answer: D

NEW QUESTION 8

A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown.
Which step should the developer take to resolve the issue and properly test the exception?

  • A. Use try/catch within the unit test to catch the exception.
  • B. Use the finally bloc within the unit test to populate the exception.
  • C. Use the database methods with all or none set to FALSE.
  • D. Use Test.isRunningTest() within the custom controller.

Answer: A

NEW QUESTION 9

Where can a developer identify the time taken by each process in a transaction using Developer Console log inspector?

  • A. Performance Tree tab under Stack Tree panel
  • B. Execution Tree tab under Stack Tree panel
  • C. Timeline tab under Execution Overview panel
  • D. Save Order tab under Execution Overview panel

Answer: C

NEW QUESTION 10

A developer has the following code:try {List nameList;Account a;String s = a.Name;nameList.add(s);} catch (ListException le ) {System.debug(' List Exception ');} catch (NullPointerException npe) {System.debug('
NullPointer Exception ');} catch (Exception e) {System.debug(' Generic Exception ');} What message will be logged?

  • A. List Exception
  • B. NullPointer Exception
  • C. Generic Exception
  • D. No message is logged

Answer: B

NEW QUESTION 11

A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private methods can be accessed by the test class?

  • A. Add the TestVisible attribute to the Apex class
  • B. Add the SeeAllData attribute to the test methods.
  • C. Add the TestVisible attribute to the apex methods.
  • D. Add the SeeAllData attribute to the test class

Answer: C

NEW QUESTION 12

Which declarative process automation feature supports iterating over multiple records?

  • A. Flows
  • B. Validation Rules
  • C. Approval Process
  • D. Workflow rules

Answer: A

NEW QUESTION 13

What is the proper process for an Apex Unit Test

  • A. Query for test data using SeeAllData = tru
  • B. Call the method being teste
  • C. Verify that the results are correct.
  • D. Query for test data using SeeAllData = tru
  • E. Execute runAllTests(). Verify that the results are correct.
  • F. Create data for testin
  • G. Execute runAllTests(). Verify that the results are correct.
  • H. Create data for testin
  • I. Call the method being teste
  • J. Verify that the results are correct.

Answer: D

NEW QUESTION 14

Which type of code represents the Model in the MVC architecture on the Force.com platform?

  • A. AController Extension method that uses SOQL to query for a list of Account records
  • B. Custom JavaScript that processes a list of Account records.
  • C. A list of Account records returned from a Controller Extension method
  • D. AController Extension method that saves a list of Account records

Answer: C

NEW QUESTION 15

What are two features of Heroku Connect? Choose 2 answers

  • A. Displaying data from an external data store via External Objects.
  • B. Real Time Sync between Salesforce and Postgres
  • C. Bidirectional syncs, allowing data to be written into Salesforce
  • D. Near Real Time Sync between Heroku Postgres and Salesforce

Answer: CD

NEW QUESTION 16

A developer needs to apply the look and feel of lightning experience to a number of applications built using a custom third-party javascript framework and rendered in visualforce pages which option achieves this?

  • A. Set the attribute enablelightning to "true" in the definition
  • B. Replace the third-party javascript library with native visualforce tags
  • C. Configure the user interface options in the setup menu to enable legacy mode for visualforce
  • D. Incorporate salesforce lightning design system css style sheets into the javascript applications

Answer: D

NEW QUESTION 17

What are two characteristics of partial copy sandboxes versus full sandboxes? Choose 2 answers

  • A. Includes a subset of metadata
  • B. Requires a sandbox template
  • C. Supports more frequent refreshes
  • D. Provides more data record storage

Answer: AC

NEW QUESTION 18

Which two platform features allow for the use of unsupported languages? Choose 2 answers

  • A. Heroku Acm
  • B. App.json
  • C. Buildpacks
  • D. Docker

Answer: CD

NEW QUESTION 19

What is a valid statement about Apex classes and interfaces? Choose 2 answers:

  • A. The default modifier for a class is private.
  • B. Exception classes must end with the word exception.
  • C. A class can have multiple levels of inner classes.
  • D. The default modifier for an interface is private.

Answer: BD

NEW QUESTION 20

Which three resources in a Lightning Component Bundle can contain JavaScript functions? Choose 3

  • A. Renderer
  • B. Design
  • C. Helper
  • D. Controller
  • E. Style

Answer: ACD

NEW QUESTION 21

Which user can edit a record after it has been locked for approval? (Choose 2)

  • A. Any user with a higher role in the hierarchy
  • B. A user who is assigned as the current approver
  • C. Any user who approved the record previously
  • D. An administrator

Answer: BD

NEW QUESTION 22

An org has a single account named ‘NoContacts’ that has no related contacts. Given the query: List<Account> accounts = [Select ID, (Select ID, Name from Contacts) from Account where
Name=‘NoContacts’];
What is the result of running this Apex?

  • A. accounts[0].contacts is invalid Apex.
  • B. accounts[0].contacts is an empty Apex.
  • C. accounts[0].contacts is Null.
  • D. A QueryException is thrown.

Answer: B

NEW QUESTION 23

A developer needs to create records for the object Property_c. The developer creates the following code
block:List propertiesToCreate = helperClass.createProperties();try { // line 3 } catch (Exception exp ) {
//exception handling }Which line of code would the developer insert at line 3 to ensure that at least some records are created, even if a few records have errors and fail to be created?

  • A. Database.insert(propertiesToCreate, false);
  • B. insert propertiesToCreate;
  • C. Database.insert(propertiesToCreate, System.ALLOW_PARTIAL);
  • D. Database.insert(propertiesToCreate);

Answer: A

NEW QUESTION 24

Which feature should a developer use to update an inventory count on related Product records when the status of an Order is modified to indicate it is fulfilled?

  • A. Process Builder process
  • B. Lightning component
  • C. Visualforce page
  • D. Workflow rule

Answer: A

NEW QUESTION 25

What is the minimum log level needed to see user-generated debug statements?

  • A. DEBUG
  • B. FINE
  • C. INFO
  • D. WARN

Answer: A

NEW QUESTION 26

A Visualforce page uses the Contact standard controller. How can a developer display the Name from the parent Account record on the page?

  • A. Use the (!contact.Account.Name) merge field syntax.
  • B. Use an additional standard controller for Accounts.
  • C. Use SOQL syntax to find the related Accounts Name field.
  • D. Use additional Apex logic within the controller to query for the Name field.

Answer: A

NEW QUESTION 27

A developer uses a Test Setup method to create an Account named 'Test'. The first test method deletes the Account record. What must be done in the second test method to use the Account?

  • A. Use SELECT Id from Account where Name='Test'
  • B. Restore the Account using an undeleted statement
  • C. The Account cannot be used in the second test method
  • D. Call the Test Setup method at the start of the test

Answer: A

NEW QUESTION 28

Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)

  • A. The @testSetup annotation cannot be used when the @isTest(SeeAllData=True) annotation is used.
  • B. Test data is inserted once for all test methods in a class.
  • C. Records created in the @testSetup method cannot be updates in individual test methods.
  • D. The @testSetup method is automatically executed before each test method in the test class is executed.

Answer: D

NEW QUESTION 29

The operation manager at a construction company uses a custom object called Machinery to manage the usage and maintenance of its cranes and other machinery. The manager wants to be able to assign machinery to different constructions jobs, and track the dates and costs associated with each job. More than one piece of machinery can be assigned to one construction job.
What should a developer do to meet these requirements?

  • A. Create a lookup field on the Construction Job object to the Machinery object.
  • B. Create a lookup field on the Machinery object to the Construction Job object.
  • C. Create a junction object with Master-Detail Relationship to both the Machinery object and the Construction Job object.
  • D. Create a Master-Detail Lookup on the Machinery object to the Construction Job object.

Answer: A

NEW QUESTION 30
......

P.S. Thedumpscentre.com now are offering 100% pass ensure PDI dumps! All PDI exam questions have been updated with correct answers: https://www.thedumpscentre.com/PDI-dumps/ (373 New Questions)