Salesforce PDI Exam Info and Free Practice Test | ExamCost
Pass Salesforce PDI Premium Files Test Engine pdf - Free Dumps Collection
NEW QUESTION 21
How many levels of child records can be returned in a single SOQL query from one parent object?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: D
NEW QUESTION 22
How can a developer set up a debug log on a specific user?
- A. Ask the user for access to their account credentials, log in as the user and debug the issue.
- B. Create Apex code that logs code actions into a custom object.
- C. Set up a trace flag for the user, and define a logging level and time period for the trace.
- D. It is not possible to setup debug logs for users other than yourself.
Answer: C
NEW QUESTION 23
In order to override a standard action with a visualforce page, which attribute must be defined in the
<apex:page> tag?
- A. Override
- B. Pagereference
- C. Controller
- D. Standardcontroller
Answer: D
NEW QUESTION 24
What can a developer use to determine if the core Apex code exceeds any governor limits in a test class during bulk execution?
- A. Test.getDmlStatements()
- B. @TestVisible
- C. Limits, startTest, stopTest
- D. @TestSetup.
Answer: C
NEW QUESTION 25
A developer needs to provide a way to mass edit,update, and delete records from a list view in which two ways can this be accomlpished? choose 2 answers
- A. Download a managed package from the appexchange that provides customizable enhanced list views and buttons
- B. Configure the user interface and enable both inline editing enhanced lists
- C. Download an unmanaged package from the appexchange that provides customizable mass edit, update and delete functionality
- D. Create a new visualforce page and apex controller for the list view that provides mass edit,update and delete functionality
Answer: A,D
NEW QUESTION 26
A developer needs to create a custom Interface in Apex.
Which three considerations must the developer keep in mind while developing the Apex Interface?
Choose 3 answers
- A. The Apex class must be declared using the interface keyword.
- B. A method implementation can be defined within the Apex Interface.
- C. A method defined In an Apex Interface cannot have an access modifier.
- D. New methods can be added to a public interface within a released package.
- E. The Apex interface class access modifier can be set to Private, Public, or Global.
Answer: A,B,C
NEW QUESTION 27
A developer considers the following snippet of code:
Based on this code, what is the value of x?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: D
NEW QUESTION 28
How should a developer avoid hitting the governor limits in test methods?
- A. Use Test.loadData() to load data from a static resource.
- B. Use @TestVisible on methods that create records.
- C. Use Test.startTest() to reset governor limits.
- D. Use @IsTest (SeeAllData=true) to use existing data.
Answer: C
NEW QUESTION 29
Which two statements true about Getter and Setter methods as they relate to Visualforce? Choose 2 answers
- A. There is no guarantee for the order in which Getter or Setter methods are executed.
- B. Setter methods always have to be declared global.
- C. Setter methods can pass a value from a controller to a page.
- D. Getter methods can pass a value from a controller to a page.
Answer: C,D
NEW QUESTION 30
Einstein Next Best Action Is configured at Universal Containers to display recommendations to internal users on the Account detail page.
If the recommendation is approved, a new opportunity record and task should be generated. If the recommendation is rejected, an Apex method must be executed to perform a callout to an external system.
Which three factors should a developer keep Hi mind when implementing the Apex method?
Choose 3 answers
- A. The method must use the @AuraEnabled annotation.
- B. The method must be defined as static.
- C. The method must use the @Future annotation.
- D. The method must be defined as public.
- E. The method must use the @invocableMethod annotation.
Answer: B,C,D
NEW QUESTION 31
Which two statements can a developer use to throw a custom exception of type MissingFieldValueException?
Choose 2 answers.
- A. Throw (MissingFieldValueException, 'Problem occurred');
- B. Throw new MissingFieldValueException();
- C. Throw new MissingFieldValueException ('Problem occurred');
- D. Throw Exception (new MissingFieldValueException());
Answer: B,C
NEW QUESTION 32
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 addError() method and have the external system subscribe to the event using CometD.
- B. Publish the error event using the Eventbus.publish() method and have the external system subscribe to the event using CometD.
- C. Have the external system subscribe to the BatchApexError event, no publishing is necessary.
- D. Publish the error event using the addError() method and write a trigger to subscribe to the event and notify the external system.
Answer: B
NEW QUESTION 33
Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)
- A. Test data is inserted once for all test methods in a class.
- B. The @testSetup annotation cannot be used when the @isTest(SeeAllData=True) annotation is used.
- C. The @testSetup method is automatically executed before each test method in the test class is executed.
- D. Records created in the @testSetup method cannot be updates in individual test methods.
Answer: C
NEW QUESTION 34
A developer has an integer variable called maxAttempts. The developer meeds to ensure that once maxAttempts is initialized, it preserves its value for the lenght of the Apex transaction; while being able to share the variable's state between trigger executions. How should the developer declare maxAttempts to meet these requirements?
- A. Declare maxattempts as a variable on a helper class
- B. Declare maxattempts as a member variable on the trigger definition.
- C. Declare maxattempts as a constant using the static and final keywords
- D. Declare maxattempts as a private static variable on a helper class
Answer: D
NEW QUESTION 35
A Licensed_Professional__c custom object exist in the system with two Master-Detail fields for the following objects: Certification__c and Contact. Users with the "Certification Representative" role can access the Certification records they own and view the related Licensed Professionals records, however users with the "Salesforce representative" role report they cannot view any Licensed professional records even though they own the associated Contact record. What are two likely causes of users in the "Sales Representative" role not being able to access the Licensed Professional records? Choose 2 answers
- A. The organization has a private sharing model for Certification__c, and Certification__c is the primary relationship in the Licensed_Professional__c object.
- B. The organization recently modified the Sales representative role to restrict Read/Write access to Licensed_Professional__c
- C. The organization has a private sharing model for Certification__c, and Contact is the primary relationship in the Licensed_Professional__c object
- D. The organization's sharing rules for Licensed_Professional__c have not finished their recalculation process.
Answer: A,D
NEW QUESTION 36
Which exception type cannot be caught ?
- A. A custom Exception
- B. LimitException
- C. NoAccessException
- D. CalloutException
Answer: B
NEW QUESTION 37
A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or update. The field update in the workflow rule is configured to not re-evaluate workflow rules. What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: C
NEW QUESTION 38
A Salesforce developer wants to review their code changes immediately and does not want to install anything on their computer or on the org.
Which tool is best suited?
- A. Third-party apps from App Exchange
- B. Setup Menu
- C. Developer Console
- D. Salesforce Extension for VSCode
Answer: C
NEW QUESTION 39
What is a characteristic of the Lightning Component Framework? Choose 2 answers:
- A. It works with existing Visualforce pages.
- B. It includes responsive components.
- C. It uses XML as its data format.
- D. It has an event-driven architecture.
Answer: B,D
NEW QUESTION 40
A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?
- A. @AuraEnabled(cacheable=false)
public static List<Opportunity> search(String term) { /*implementation*/ } - B. @AuraEnabled(cacheable=true)
public List<Opportunity> search(String term) { /*implementation*/ } - C. @AuraEnabled(cacheable=false)
public List<Opportunity> search(String term) { /*implementation*/ } - D. @AuraEnabled(cacheable=true)
public static List<Opportunity> search(String term) { /* implementation*/ }
Answer: D
NEW QUESTION 41
What is a benefit of developing applications in a multi-tenant environment?
- A. Enforced best practices for development
- B. Access to predefined computing resources
- C. Unlimited processing power and memory
- D. Default out-of-the-box configuration
Answer: A
NEW QUESTION 42
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. Create a controller extension.
- B. Use the <apex:include> tag.
- C. Add a method to the standard controller.
- D. Use the <apex:relatedList> tag.
Answer: C
NEW QUESTION 43
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 view on the Apex Classes page.
- B. View the Class test Coverage tab on the Apex Class record.
- C. Select and run the class on the Apex Test Execution page
- D. view the overall Code Coverage panel of the tab in the Developer Console.
Answer: D
NEW QUESTION 44
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 45
......
Updated Official licence for PDI Certified by PDI Dumps PDF: https://www.examcost.com/PDI-practice-exam.html
New 2022 Realistic PDI Dumps Test Engine Exam Questions in here: https://drive.google.com/open?id=1sJYPV8gwwC0j07LQwKES-3fCOAJw1Y6x

