Prepare PDII Exam Questions [2024] Recently Updated Questions
Give push to your success with PDII exam questions
NEW QUESTION # 26
What field type can be used in the WHERE clause to improve SOQL query performance? Choose 3 answers
- A. Telephone fields
- B. Email fields
- C. External Id fields
- D. Lookup fields
- E. Name fields
Answer: C,D,E
NEW QUESTION # 27
Recently a Salesforce org's integration failed because it exceeded the number of allowed API calls in a 24-hour period. The integration handles a near real-time, complex insertion of data into Salesforce. The flow of data is as follows: * The integration looks up Contact records with a given email address and, if found, the integration adds a Task to the first matching Contact it finds. If a match is not found, the integration looks up Lead records with a given email address and, if found, the integration adds a Task to the first matching Lead it finds. * If a match is not found, the integration will create a Lead and a Task for that newly created Lead. What is one way in which the integration can stay near real-time, but not exceed the number of allowed API calls in a 24-hour period?
- A. Use the REST API as well as the SOAP API to effectively double the API calls allowed in a 24-hour period.
- B. write a custom Apex web service that, given an email address, does all of the logic the integration code was doing.
- C. Create several Apex InboundEmailHandlers to accept calls from the third-party system, thus bypassing the API limits.
- D. Create an Inbound Message that, using Flow, can do all of the logic the integration code was doing.
Answer: C
NEW QUESTION # 28
A developer notices the execution of all the test methods in a class takes a long time to run, due to the initial setup of all the test data that is needed to perform the tests. What should the developer do to speed up test execution?
- A. Ensure proper usage of test data factory in all test methods.
- B. Define a method that creates test data and annotate with @testSetup.
- C. Reduce the amount of test methods in the class.
- D. Define a method that creates test data and annotate with @createData.
Answer: B
Explanation:
The @testSetup annotation allows you to define a method that creates test data and is executed only once before all the test methods in a class. This can speed up test execution by reducing the number of DML operations and avoiding code duplication. The @createData annotation does not exist in Apex. The test data factory is a design pattern that can be used to create test data, but it does not guarantee faster execution. Reducing the amount of test methods in a class may compromise the test coverage and quality. Reference: [Test Setup Methods], [Test Data Factory]
NEW QUESTION # 29
A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes.
Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Also, Workflows that once sent emails and created tasks no longer do so. Which two statements are true regarding these issues and resolution? Choose 2 answers
- A. The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.
- B. A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.
- C. The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts and Workflows in Production
- D. Page Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.
Answer: B,C
NEW QUESTION # 30
When should you use the "transient" property on variables?
- A. Variables that you want transmitted as part of the view state. Static variables also don't get transmitted
- B. Static variables that you want transmitted as part of the view state to save space
- C. Variables that you don't want transmitted as part of the view state. Static variables also don't get transmitted
- D. Large variables in order to save space
Answer: C
NEW QUESTION # 31
REST uses __________.
- A. The HTTPResponse class
- B. All of the above
- C. The HTTP class
- D. The HTTPRequest class
Answer: B
Explanation:
CalloutException happens if an error occurs Classes begin with @RestResource(urlMapping='/yourUrl'), and methods can have annotations such as @HttpGet, @HttpPost, etc
NEW QUESTION # 32
A developer has a page with two extensions overriding the Standard controller for Case. <apex:page standardController="Case" extension3="CaseExtensionOne,CaseExtension Two" showHeader="false"> Each extension has a method called Save. The page has a command button as defined: <apex:commandButton value="Save" action="{!save}"/> What will happen when a user clicks the command button?
- A. Save from Case Standard Controller will be executed.
- B. Save from CaseExtensionOne will be executed.
- C. Save from CaseExtensionTwo will be executed.
- D. All of the three Save methods will be executed.
Answer: B
NEW QUESTION # 33
Consider the following queries. For these queries, assume that there are more than 200,000 Account records.
These records include soft-deleted records; that is, deleted records that are still in the Recycle Bin. Note that there are two fields that are marked as External Id on the Account. These fields are Customer_Number__c and ERP_Key__c.
Which two queries are optimized for large data volumes? Choose 2 answers
- A. SELECT Id FROM Account WHERE Id IN : aListVariable
- B. SELECT Id FROM Account WHERE Name != NULL
- C. SELECT Id FROM Account WHERE Name != ' ' AND IsDeleted = false
- D. SELECT Id FROM Account WHERE Name != ' ' AND Customer Number c = 'ValueA'
Answer: A,D
NEW QUESTION # 34
Refer to the test method below''
The test method calls a web service that updates an external system with Account information and sets the Accounts integration_Updated__c checkbox to True when it completes.
The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts."
- A.

- B.

- C.

- D.

Answer: B
NEW QUESTION # 35
Universal Containers allows customers to log into a Salesforce Community and update their orders via a custom Visualforce page. Universal Containers' sales representatives can edit the orders on the same Visualforce page.
What should a developer use in an Apex test class to test that record sharing is enforced on the Visualforce page?
- A. Use System.profilels() to test as a sales rep and a community user.
- B. Use System.runAs() to test as an administrator and a community user.
- C. Use System.profllels() to test as an administrator and a community user,
- D. Use System.runAs() to test as a sales rep and a community user.
Answer: D
NEW QUESTION # 36
Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?
- A. Developer Log
- B. Asynchronous Data Capture Events
- C. Calendar Events
- D. Event Monitoring Log
Answer: D
NEW QUESTION # 37
Universal Containers is leading a development team that follows the source-driven development approach in Salesforce. As part of their continuous integration and delivery (CL/CD) process, they need to automatically deploy changes to multiple environments, including sandbox and production.
'Which mechanism or tool would best support their CI/CD pipeline in source-driven development?
- A. Salesforce Extensions for Visual Studio Code
- B. Ant Migration Tool
- C. Change Sets
- D. Salesforce CLI with Salesforce DX
Answer: D
Explanation:
Salesforce CLI with Salesforce DX is a mechanism or tool that can best support the CI/CD pipeline in source-driven development. Salesforce CLI is a command-line interface that can be used to create, manage, and deploy Salesforce projects and orgs. Salesforce DX is a set of tools and features that can be used to enable source-driven development, team collaboration, and agile delivery on the Lightning Platform. By using Salesforce CLI with Salesforce DX, the developer can automate the deployment of changes to multiple environments, including sandbox and production, using scripts, commands, and metadata. Salesforce CLI with Salesforce DX can also integrate with other CI/CD tools and services, such as Jenkins, Git, or Heroku. Reference: [Salesforce CLI], [Salesforce DX]
NEW QUESTION # 38
Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity's Account?
A)
B)
C)
D)
- A. Option A
- B. Option D
- C. Option B
- D. Option C
Answer: D
NEW QUESTION # 39
Consider the following code snippet:
How should <c-order> component communicate to the <c-order-order> component that an order has been selected by the user?
- A. Create and fire a standard DOM event.
- B. Create and fire a component event.
- C. Created and fire an application event.
- D. Create and dispatch a custom event
Answer: A
NEW QUESTION # 40
Which three Visualforce components can be used to initiate Ajax behavior to perform partial page updates? Choose 3 answers
- A.

- B.

- C.

- D.

- E.

Answer: A,B,D
NEW QUESTION # 41
Which three actions must be completed in a Lightning web component for a JavaScript file In a static resource to be loaded? Choose 3 answers
- A. Call loadScript.
- B. Reference the static resource in a <script> tag.
- C. Append the static resource to the DOM.
- D. Import a method from the platformResourceLoader.
- E. Import the static resource.
Answer: A,D,E
Explanation:
The three actions that must be completed in a Lightning web component for a JavaScript file in a static resource to be loaded are to import the static resource, call loadScript, and import a method from the platformResourceLoader. Importing the static resource allows the developer to reference the JavaScript file by name, and use the @salesforce/resourceUrl annotation to assign the URL of the file to a property. Calling loadScript allows the developer to load the JavaScript file dynamically, and use a callback function to handle the success or failure of the loading. Importing a method from the platformResourceLoader allows the developer to use the loadScript method, which is a utility method that is part of the platformResourceLoader module. Referencing the static resource in a <script> tag will not work, as the <script> tag is not supported in the Lightning web component template, and it will not load the JavaScript file. Appending the static resource to the DOM will not work, as it is not a valid way to load a JavaScript file in a Lightning web component, and it will not execute the code in the file. Reference: [Use Third-Party JavaScript Libraries], [Lightning Web Components Developer Guide]
NEW QUESTION # 42
A Developer wishes to improve runtime performance of Apex calls by caching results on the client. What is the best way to implement this?
- A. Decorate the server-side method with @AuraEnabled(storable=true).
- B. Call the setStorable() method on the action in the JavaScript client-side code.
- C. Set a cookie in the browser for use upon return to the page.
- D. Decorate the server-side method with @AuraEnabled(cacheable=true).
Answer: A
NEW QUESTION # 43
......
Get PDII Actual Free Exam Q&As to Prepare Certification: https://www.test4engine.com/PDII_exam-latest-braindumps.html
PDII 100% Guarantee Download PDII Exam PDF Q&A: https://drive.google.com/open?id=1-X5YFv86q-HTOdypD0kC_OWcuoHB8dwf