
Salesforce PDI PDI Dumps Full Questions with Free PDF Questions to Pass
100% Updated Salesforce PDI Enterprise PDF Dumps
Who should take the PDI Exam
Salesforce Certified Platform Developer I certification is an internationally-recognized validation that identifies persons who earn it as possessing skilled as a Salesforce Certified Platform Developer I. If a candidate wants significant improvement in career growth needs enhanced knowledge, skills, and talents. The Salesforce PDI Exam provides proof of this advanced knowledge and skill. If a candidate has knowledge of associated technologies and skills that are required to pass the Salesforce PDI Exam then he should take this exam.
NEW QUESTION 19
A developer has the following class and trigger code:
public class InsuranceRates { public static final Decimal smokerCharge = 0.01; } trigger ContactTrigger on Contact (before insert) { InsuranceRates rates = new InsuranceRates(); Decimal baseCost = XXX; } Which code segment should a developer insert at the XXX to set the baseCost variable to the value of the class variable smokerCharge?
- A. Rates.getSmokerCharge()
- B. Rates.smokerCharge
- C. ContactTrigger.InsuranceRates.smokerCharge
- D. InsuranceRates.smokerCharge
Answer: D
NEW QUESTION 20
How can a developer warn users of SOQL governor limit violations in a trigger?
- A. Use Limits.getQueries() and display an error message before the number of SOQL queries exceeds the limit.
- B. Use Messaging.SendEmail() to continue the transaction and send an alert to the user after the number of SOQL queries exceeds the limit.
- C. Use ApexMessage.Message() to display an error message after the number of SOQL queries exceeds the limit.
- D. Use PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number of SOQL queries exceeds the limit.
Answer: A
NEW QUESTION 21
Universal Containers (UC) decided it will not to send emails to support personnel directly from Salesforce in the event that an unhandled exception occurs. Instead, UC wants an external system be notified of the error. What is the appropriate publish/subscribe logic to meet these requirements?
- A. Publish the error event using the Eventbus.publish() method and have the external system subscribe to the event using CometD.
- B. Publish the error event using the addError() method and write a trigger to subscribe to the event and notify the external system.
- C. Have the external system subscribe to the BatchApexError event, no publishing is necessary.
- D. Publish the error event using the addError() method and have the external system subscribe to the event using CometD.
Answer: A
NEW QUESTION 22
What are two testing consideration when deploying code from a sandbox to production? Choose 2 answers
- A. Apex code requires 100% coverage
- B. 100% of test must execute without failure
- C. Apex code requires 75% coverage
- D. 75% of test must execute without failure
Answer: B,C
NEW QUESTION 23
A developer is asked to create a Visualforce page that displays some Account fields as well as fields configured on the page layout for related Contacts.
How should the developer implement this request?
- A. Use the <apex:relatedList> tag.
- B. Create a controller extension.
- C. Use the <apex:include> tag.
- D. Add a method to the standard controller.
Answer: C
NEW QUESTION 24
Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?
- A. Map <sObject> searchList = (FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead);
- B. List<List <sObject>> searchList = (FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead);
- C. List <sObject> searchList = (FIND "*ACME*" IN ALL FIELDS RETURNING Contact, Lead);
- D. List<List < sObject>> searchList = (SELECT Name, ID FROM Contact, Lead WHERE Name like '%ACME%');
Answer: B
NEW QUESTION 25
What are two ways a developer can get the status of an enquered job for a class that queueable interface?
Choose 2 answers
- A. View the apex status Page
- B. View the apex Jobs page (Missed)
- C. Query the AsyncApexJobe object (Missed)
- D. View the apex flex Queue
Answer: B,C
NEW QUESTION 26
In the following example, which sharing context will myMethod execute when it is invoked?
- A. Sharing rules will not be enforced for the running user.
- B. Sharing rules will be inherited from the calling context.
- C. Sharing rules Ml be enforced for the running user.
- D. Sharing rules Ail be enforced by the instantiating class
Answer: B
NEW QUESTION 27
How can a custom type be identified as unique when added to a Set?
- A. Methods in the class must be global
- B. The class must implement the Equals and Hashcode methods
- C. The class must have a method with the @InvocableMethod annotation
- D. Methods in the class must be static
Answer: B
NEW QUESTION 28
How can a developer use a Set<Id> to limit the number of records returned by a SOQL query?
- A. Pass the query results as an argument in a reference to the Set.containsAll() method.
- B. Reference the Set in the WHERE clause of the query
- C. Reference the Set in the LIMIT clause of the query
- D. Pass the Set as an argument in a reference to the Database.query() method
Answer: B
NEW QUESTION 29
In the code below, which type does String inherit from? String s = 'Hello World';
- A. Class
- B. Object
- C. Object
- D. Prototype
Answer: B
NEW QUESTION 30
The sales management team requires that the lead source field of the Lead record be populated when Lead is converted. What would a developer use to ensure that a user populates the Lead source field?
- A. Validation rule
- B. Workflow rule
- C. Formula field
- D. Process builder
Answer: A
NEW QUESTION 31
Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)
- A. The @testSetup method is automatically executed before each test method in the test class is executed.
- B. Test data is inserted once for all test methods in a class.
- C. The @testSetup annotation cannot be used when the @isTest(SeeAllData=True) annotation is used.
- D. Records created in the @testSetup method cannot be updates in individual test methods.
Answer: A
NEW QUESTION 32
Which two strategies should a developer use to avoid hitting governor limits when developing in a multi-tenant environment? (Choose two.)
- A. Use SOQL for loops to iterate data retrieved from queries that return a high number of rows.
- B. Use variables within Apex classes to store large amounts of data.
- C. Use collections to store all fields from a related object and not just minimally required fields.
- D. Use methods from the "Limits" class to monitor governor limits.
Answer: A,D
NEW QUESTION 33
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 try/catch within the unit test to catch the exception.
- 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 Test.isRunningTest() within the customer controller.
Answer: A
NEW QUESTION 34
What is the advantage of Salesforce Lightning?
- A. Option 3
- B. Pre-defined components to give Standard Look and Feel
- C. Option 4
- D. Uses service side for better handling
Answer: B
NEW QUESTION 35
Which two events need to happen when deploying to a production org? Choose 2 answers
- A. All triggers must have at least 75% test coverage.
- B. All triggers must have at least 1% test coverage.
- C. All Apex code must have at least 75% test coverage.
- D. All test and triggers must have at least 75% test coverage combined
Answer: B,C
NEW QUESTION 36
......
Use Valid Exam PDI by PassCollection Books For Free Website: https://www.passcollection.com/PDI_real-exams.html
Free Salesforce PDI PDI Official Cert Guide PDF Download: https://drive.google.com/open?id=1sWZdwf3t-CQGhNiP1qqm-rr-eczjxhX0

