PDI Practice Exam and Study Guides - Verified By BraindumpQuiz Updated 207 Questions [Q87-Q109]

Share

PDI Practice Exam and Study Guides - Verified By BraindumpQuiz Updated 207 Questions

2021 Updated Verified Pass PDI Study Guides & Best Courses

NEW QUESTION 87
A user selects a value from a multi-select picklist. How is this selected value represented in Apex?

  • A. As a string ending with a comma
  • B. As a list< String > with one element
  • C. As a set< string > with one element
  • D. As a string

Answer: D

 

NEW QUESTION 88
Which code displays the contents of a Visualforce page as a PDF?

  • A. <apex:page renderAs="pdf">
  • B. <apex:page rendersAs="application/pdf">
  • C. <apex:page contentType="application/pdf">
  • D. <apex:page contentType="pdf">

Answer: A

Explanation:
Explanation
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_renderas.htm You can generate a downloadable, printable PDF file of a Visualforce page using the PDF rendering service.
Convert a page to PDF by changing the <apex:page> tag.
<apex:page renderAs="pdf">

 

NEW QUESTION 89
What is true of a partial sandbox that is not true of a full sandbox? Choose 2 answers

  • A. Use of change sets
  • B. More frequent refreshes
  • C. Limited to 5 GB of data
  • D. Only includes necessary meta data

Answer: B,C

 

NEW QUESTION 90
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system.
Whithin 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? Choose 2 answers

  • A. Use the @Readonly annotation and the with sharing keyword on the class.
  • B. Use a regular expression on the parameter to remove special characters.
  • C. Use the escapeSingleQuote method to sanitize the parameter before its use.
  • D. Use variable binding and replace the dynamic query with a static SOQL.

Answer: A,B

 

NEW QUESTION 91
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 92
What can be developed using the Lightning Component framework?

  • A. Dynamic web sites
  • B. Hosted web applications
  • C. Single-page web apps
  • D. Salesforce integrations

Answer: C

 

NEW QUESTION 93
Which three per-transaction limits have higher governor limits in asynchronous Apex transactions?

  • A. Maximum CPU time
  • B. Total SOQL queries
  • C. Records returned by SOQL
  • D. Maximum execution time
  • E. Maximum heap size

Answer: A,B,C

 

NEW QUESTION 94
Developer needs to automatically populate the Reports To field in a Contact record based on the values of the related Account and Department fields in the Contact record. Which type of trigger would the developer create? Choose 2 answers

  • A. After insert
  • B. After update
  • C. Before update
  • D. Before insert

Answer: C,D

 

NEW QUESTION 95
Where are two locations a developer can look to find information about the status of asynchronous or future cals? Choose 2 answers

  • A. Apex Jobs
  • B. Paused Flow Interviews component
  • C. Time-Based Workflow Monitor
  • D. Apex Flex Queue

Answer: A,D

 

NEW QUESTION 96
Which code block returns the ListView of an Account object using the following debug statement?
system.debug(controller.getListViewOptions() );

  • A. ApexPages.StandardSetController controller = new ApexPages.StandardSetController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1'));
  • B. ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT Id FROM Account LIMIT 1]);
  • C. ApexPages.StandardController controller = new ApexPages.StandardController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1'));
  • D. ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT Id FROM Account LIMIT 1]);

Answer: A

 

NEW QUESTION 97
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

Answer: B

 

NEW QUESTION 98
A lead object has a custom field Prior_Email__c. The following trigger is intended to copy the current Email into the Prior_Email__c field any time the Email field is changed:

Which type of exception will this trigger cause?

  • A. A null reference exception
  • B. A DML exception
  • C. A limit exception when doing a bulk update
  • D. A compile time exception

Answer: B

 

NEW QUESTION 99
Refer to the following code snippet for an environment has more than 200 Accounts belonging to the Technology' industry:

When the code execution, which two events occur as a result of the Apex transaction?
When the code executes, which two events occur as a result of the Apex transaction?
Choose 2 answers

  • A. The Apex transaction fails with the following message. "SObject row was retrieved via SOQL without querying the requested field Account.Is.Tech__c''.
  • B. If executed In a synchronous context, the apex transaction is likely to fall by exceeding the DHL governor limit.
  • C. If executed in an asynchronous context, the apex transaction is likely to fall by exceeding the DML governor limit
  • D. The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are updated.

Answer: A

 

NEW QUESTION 100
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. Insurancerates.smokercharge
  • B. Rates.getsmokercharge()
  • C. Contacttrigger.insurancerates.smokercharge
  • D. Rates.smokercharge

Answer: A

 

NEW QUESTION 101
A developer creates an Apex helper class to handle complex trigger logic. How can the helper class warn users when the trigger exceeds DML governor limits?

  • A. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements is exceeded.
  • B. By using Messaging.sendEmail() to continue toe transaction and send an alert to the user after the number of DML statements is exceeded.
  • C. By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number of DML statements is exceeded.
  • D. By using AmexMessage.Messages() to display an error message after the number of DML statements is exceeded.

Answer: A

 

NEW QUESTION 102
Account acct = {SELECT Id from Account limit 1}; Given the code above, how can a developer get the type of object from acct?

  • A. Call "acct.SobjectType"
  • B. Call "acct.getsObjectType()"
  • C. Call "Account.SobjectType"
  • D. Call "Account.getSobjectType()"

Answer: B

 

NEW QUESTION 103
A developer has a requirement to create an Order When an Opportunity reaches a "Closed-Won" status.
Which tool should be used to implement this requirement?

  • A. Process Builder
  • B. Apex trigger
  • C. Lightning Component
  • D. Lightning

Answer: B

 

NEW QUESTION 104
Which three resources in an Azure Component can contain JavaScript functions?

  • A. Design
  • B. helper
  • C. Renderer
  • D. Style
  • E. Controllers

Answer: B,C,E

 

NEW QUESTION 105
A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors. What is the correct definition of the Apex method?

  • A. @InvocableMethod
    global static List<List<Recommendation>> getLevel(List<ContactWrapper> input)
    { /*implementation*/ }
  • B. @InvocableMethod
    global List<List<Recommendation>> getLevel(List<ContactWrapper> input)
    { /*implementation*/ }
  • C. @InvocableMethod
    global static ListRecommendation getLevel(List<ContactWrapper> input)
    { /*implementation*/ }
  • D. @InvocableMethod
    global Recommendation getLevel (ContactWrapper input)
    { /*implementation*/ }

Answer: A

 

NEW QUESTION 106
If apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which statement are true regarding governor limits? Choose 2 answers

  • A. The apex governor limits are reset for each iteration of the execute() mrthod.
  • B. The Apex governor limits might be higher due to the asynchronous nature of the transaction.
  • C. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction,
  • D. The Apex governor limits are relaxed while calling the costructor of the Apex class.

Answer: A,B

 

NEW QUESTION 107
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?

  • A. Use Deploy from the VSCode IDE to display an 'insert Contact' Apex class.
  • B. Use the Test menu on the Developer Console to run all test classes for the Contact trigger
  • C. Use the New button on the Salesforce Contacts Tab to create a new Contact record.
  • D. Use the Open execute Anonymous feature on the Developer Console to run an 'insert Contact' DML statement

Answer: B

 

NEW QUESTION 108
An Apex method, getAccounts, that returns a List of Accounts given a searchTerm, is available for Lightning Web components to use.
What is the correct definition of a Lightning Web component property that uses the getAccounts method?

  • A. Option D
  • B. Option B
  • C. Option A
  • D. Option C

Answer: C

 

NEW QUESTION 109
......


Salesforce PDI Exam Syllabus Topics:

TopicDetails
Topic 1
  • Describe the capabilities of the declarative process automation features
  • Describe the considerations when developing in a multi-tenant environment
Topic 2
  • Describe the types of web content that can be incorporated into Visualforce pages
  • Use programmatic techniques to prevent security vulnerabilities
Topic 3
  • Describe the capabilities and use cases for formula fields and roll-up summary fields
  • identify common use cases for declarative versus programmatic customizations
Topic 4
  • Describe the Salesforce Developer tools such as Salesforce DX, Salesforce CLI
  • Describe the relationship between Apex transactions
Topic 5
  • Write and execute tests for triggers, controllers, classes, flows
  • Describe the options for and considerations when importing and exporting data into development environments
Topic 6
  • Implement exception handling in Apex, including custom exceptions as needed
  • ncorporate Visualforce pages into Lightning Platform applications
Topic 7
  • Describe the types of content that can be contained in a Lightning web component
  • write Apex classes and use Apex interfaces
Topic 8
  • Understand design frameworks, such as MVC architecture and Aura Framework
  • Identify the implications of governor limits on Apex transactions
Topic 9
  • Describe the use cases for Lightning component events and application events
  • Given a use case, write Apex classes and triggers following best practices
Topic 10
  • Display and use a custom user interface components, including Lightning Components, Visual Flow, and Visualforce
  • Describe the environments, requirements, and process for deploying code and associated configurations
Topic 11
  • Declare variables, constants, methods, and use modifiers and interfaces in Apex
  • Describe how to approach debugging system issues and monitoring flows, processes

 

Ultimate Guide to the PDI - Latest Edition Available Now: https://www.braindumpquiz.com/PDI-exam-material.html

2021 Updated Verified Pass PDI Exam - Real Questions & Answers: https://drive.google.com/open?id=1frz_1Wq_A70-xxCRjoQ3-53Z83djk72B