Salesforce PDII Exam Questions (Updated 2023) 100% Real Question Answers [Q71-Q87]

Share

Salesforce PDII Exam Questions (Updated 2023) 100% Real Question Answers

Pass Salesforce PDII Exam Quickly With ITPassLeader

NEW QUESTION # 71
A developer used custom settings to store some configuration data that changes occasionally. However, tests are now failing in some of the sandboxes that were recently refreshed.
What should be done to eliminate this issue going forward?

  • A. Set the setting type on the custom setting to Hierarchy.
  • B. Replace custom settings with custom metadata.
  • C. Replace custom settings with static resources.
  • D. Set the setting type on the custom setting to List.

Answer: B


NEW QUESTION # 72
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. Append the static resource to the DOM.
  • C. Import a method from the platformftesourceLoader,
  • D. Reference the static resource in a <script> tag.
  • E. Import the static resource.

Answer: A,C,E


NEW QUESTION # 73
Which method should be used to convert a Date to a String in the current user's locale?

  • A. String format
  • B. String.valueOf
  • C. Date.format
  • D. Date.parse

Answer: B


NEW QUESTION # 74
Choose the correct definition for <apex:pageMessage>.

  • A. A single message, without formatting, that can be associated with a specific component on the page
  • B. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the "ApexPages.addMessage" function
  • C. No formatting; displays all errors on a page
  • D. Standard Salesforce formatting, throws a specific message on a page

Answer: D


NEW QUESTION # 75
Example 1: AggregateResult[] groupedResults = [SELECT Campaignid, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResuits) { System.debug ('Campaign ID' + ar.get('CampaignId'-); System.debug ('Average amount' + ar.get('exprd')); } Example 2: AggregateResult[] groupedResults = [SELECT Campaignid, AVG(Amount) theAverage FROM Opportunity GROUP BY Campaignid]; for (AggregateResult ar : groupedResuits) { System.debug(*Campaign ID' + ar.get('CampaignId')); System.debug ('Average amount' + ar.get('theAverage')); } Example 3:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResuits) System.debug(*Campaign ID' + ar.get('CampaignId')); System.debug('Average amount' + ar.get.AVG(-); } Example 4:AggregateResult[] groupedResults = [SELECT CampaigniId, AVG(Amount) theAverage FROM Opportunity GROUP BY Campaignid]; for (AggregateResult ar : groupedResults) { System.debug('Campaign ID' + ar.get('CampaignId')); System.debug ('Average amount' + ar.theAverage-; } Which two of the examples above have correct System.debug statements? Choose 2 answers

  • A. Example 3
  • B. Example 4
  • C. Example 1
  • D. Example 2

Answer: C,D


NEW QUESTION # 76
Example 1: AggregateResult[] groupedResults = [SELECT Campaignid, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResuits) { System.debug ('Campaign ID' + ar.get('CampaignId'-); System.debug ('Average amount' + ar.get('exprd')); } Example 2: AggregateResult[] groupedResults = [SELECT Campaignid, AVG(Amount) theAverage FROM Opportunity GROUP BY Campaignid]; for (AggregateResult ar : groupedResuits) { System.debug(*Campaign ID' + ar.get('CampaignId')); System.debug ('Average amount' + ar.get('theAverage')); } Example 3: AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResuits) System.debug(*Campaign ID' + ar.get('CampaignId')); System.debug('Average amount' + ar.get.AVG(-); } Example 4:AggregateResult[] groupedResults = [SELECT CampaigniId, AVG(Amount) theAverage FROM Opportunity GROUP BY Campaignid]; for (AggregateResult ar : groupedResults) { System.debug('Campaign ID' + ar.get('CampaignId')); System.debug ('Average amount' + ar.theAverage-; } Which two of the examples above have correct System.debug statements? Choose 2 answers

  • A. Example 1
  • B. Example 3
  • C. Example 4
  • D. Example 2

Answer: C,D


NEW QUESTION # 77
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. Page Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.
  • B. The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.
  • C. The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts and Workflows in Production
  • D. A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.

Answer: C,D


NEW QUESTION # 78
A developer writes the following code: public with sharing class OrderController { public PaqeReference sendOrder() { Order__c order = new Order__c insert order; ExternalOrder externalOrder = new ExternalOrder (order); Http h = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint('https://www.example.org/v1/orders'); req.setMethod('POST'); req.setBody(JSON.serialize(externalOrder)); HttpResponse res = h.send(req); order = (ExternalOrder)JSON.deserialize(res.getBody(),ExternalOrder.class); } } While testing the code, the developer receives the following error message: System.CalloutException : You have uncommitted work pending What should the developer do? Choose 2 answers

  • A. Move the web service callout into an @future method.
  • B. Ensure all callouts are completed prior to executing DML statements.
  • C. Use the asyncSend() method of the HTTP class to send the request in async context.
  • D. Use Database.insert (order, true) to immediately commit any database changes.

Answer: A,B


NEW QUESTION # 79
A Visualforce page loads slowly due to the large amount of data it displays. Which strategy can a developer use to improve the performance

  • A. use lazy loading to load the data on demand, instead of in the controller's constructor.
  • B. use an <apex:actionPoller> in the page to load all of the data asynchronously.
  • C. use Javascript to move data processing to the browser instead of the controller.
  • D. Use the transient keyword for the List variables used in the custom controller.

Answer: A


NEW QUESTION # 80
What is a valid return type for the following SOSL query? [FIND 'map"' IN ALL FIELDS RETURNING Account (Id, Name) , Contact, Opportunity,Lead]

  • A. List < List< sObject>>
  • B. List< sobject>
  • C. List< Account>
  • D. List< AggregateResult>

Answer: A


NEW QUESTION # 81
Which of the follow be used together in DML operations (transaction)? (Choose two.)

  • A. Opportunity - User
  • B. Account - Order
  • C. Case - CaseComment
  • D. Account - AccountShare

Answer: B,C


NEW QUESTION # 82
After a Platform Event is defined in a Salesforce org, events can be published via which two mechanisms? Choose 2 answers

  • A. External Apps require a custom Apex web service.
  • B. External Apps can use the standard Streaming API.
  • C. internal Apps can use Outbound Messages
  • D. Internal Apps can use Process Builder.

Answer: B,D

Explanation:
internal apps can use processes, flows, or Apex to publish platform event messages from a Salesforce app. Process Builder is a tool that lets you automate business processes by creating processes. You can use Process Builder to publish platform event messages when a record changes or when a platform event occurs.
external apps can use Salesforce APIs to publish platform event messages. You can use any Salesforce API to create platform events, such as SOAP API, REST API, or Bulk API. The Streaming API is a Salesforce API that lets you push a stream of notifications from Salesforce to external apps. You can use the Streaming API to publish platform event messages by creating records of your event type.
Therefore, using Process Builder and Streaming API are two mechanisms to publish platform event messages after a platform event is defined in a Salesforce org.
https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_publish.htm


NEW QUESTION # 83
A company uses Salesforce to sell products to customers. They also have an external product information management (PIM) system that is the system of record for products.
A developer received these requirements:
* Whenever a product is created or updated in the PIM, a product must be created or updated as a Product2 record in Salesforce and a PricebookEntry record must be created or updated automatically by Salesforce.
* The PricebookEntry should be created In a Pricebook2 that is specified In a custom setting.
What should the developer use to satisfy these requirements?

  • A. SObJect Tree
  • B. Event Monitoring
  • C. Invocable Action
  • D. Apex REST

Answer: D


NEW QUESTION # 84
If the "PageReference.setRedirect" Apex function is set to False, what type of request is made?

  • A. Postback request
  • B. If PageReference points to the same controller and subset of extensions, postback request, otherwise get request
  • C. Get request

Answer: B


NEW QUESTION # 85
A company needs to automatically delete sensitive information after 7 years. This could delete almost a million records every day.
How can this be achieved?

  • A. Schedule an ©future process to Query records older than 7 years, and then recursively invoke itself in 1,000 record batches to delete them.
  • B. Perform a SOSL statement to find records older than 7 years, and then delete the entire result set.
  • C. Use aggregate functions to query for records older than 7 years, and then delete the AggregateResult objects.
  • D. Schedule a batch Apex process to run every day that Queries and deletes records older than 7 years.

Answer: D


NEW QUESTION # 86
Lightning Aura Component

Given the code above, which two changes need to be made in the Apex Controller for the code to work' Choose 2 answers

  • A. Change the argument from JSONObject to String.
  • B. Remove line 06 from the Apex Controller and use firstName In the return.
  • C. Change the method signature to be global static, not public static.
  • D. Annotate the entire class as @AuraEnabled instead of just the single method.

Answer: B,C


NEW QUESTION # 87
......

Real Salesforce PDII Exam Questions [Updated 2023]: https://troytec.itpassleader.com/Salesforce/PDII-dumps-pass-exam.html

0
0
0
0