[Oct-2021] Practice Salesforce PDII exam. Online Exam Practice Tests with detailed explanations! Pass PDII with confidence! [Q193-Q214]

Share

Practice Salesforce Developers PDII exam. Online Exam Practice Tests with detailed explanations! Pass PDII with confidence!

PDII - Salesforce Certified Platform Developer II (PDII) Practice Tests 2021 | Actual4Dumps

NEW QUESTION 193
A company wants to implement a new call center process for handling customer service calls. It requires service reps to ask for the caller's account number before proceeding with the rest of their call script. Following best practices, what should a developer use to meet this requirement?

  • A. Apex Trigger
  • B. Approvals
  • C. Process Builder
  • D. Flow Builder

Answer: C

 

NEW QUESTION 194
Customer billing data must be added and updated into Salesforce from a remote system on a weekly basis.
Additionally, customer activity information must be extracted from Salesforce and put it into an on-premises data warehouse on a weekly basis.
Which approach should be used to import data into Salesforce and export data out of Salesforce, taking into consideration that these imports and exports can interfere with end-user operations during business hours and involve large amounts of data?

  • A. Replication via third-party ETL to push data into Salesforce and pull data out in batches
  • B. Batch Apex, where Salesforce pushes data to and pulls data from the remote systems
  • C. Salesforce Connect to push data to and pull data from the remote systems
  • D. Call-in directly from each remote system to Salesforce APIs to push and pull the data

Answer: A

 

NEW QUESTION 195
A company wants to create a dynamic survey that navigates users through a different series of questions based on their previous responses. What is the recommended solution to meet this requirement?

  • A. Dynamic Record Choice
  • B. Lightning Process Builder
  • C. Visualforce and Apex
  • D. Custom Lightning application

Answer: A

 

NEW QUESTION 196
What is the optimal syntax for adding a link to a case in a Visualforce page? Choose 2 answers

  • A. < apex:outputLink value="{!URLFOR($Action.Case.View,case.Id)}" target="_blank"> (LIE
    {!case.Name} < /apex:outputLink>
  • B. < apex:outputLink value="{!viewCase(case.Id)}" target="_blank"> [] {lcase.Name} <
    /apex:outputLink>
  • C. < apex:outputLink value="/{!case.Id}" target="_blank"> [] {lcase.Name} < /apex:outputLink>
  • D. < apex:outputLink value="{!URLFOR($Action.Case.Open, case)}" target="_blank"> [] {lcase.Name} <
    /apex:outputLink>

Answer: A,C

 

NEW QUESTION 197
A developer needs test data for Apex test classes.
What can the developer use to provide test data to the test methods? (Choose two.)

  • A. myDataFactory.createTestRecords (10)
  • B. List<sObject> Is = Test.loadData (Lead.sObjectType, 'myTestLeads');
  • C. List<sObject> Is = Test.loadDat (Lead.sObjectType, $Resource + 'myTestLeads');
  • D. Database.createTestRecords (10)

Answer: A,B

 

NEW QUESTION 198
A custom field Exec_Count_c of type Number is created on an Account object. An account record with value of "1" for a: Exec__Count_c is saved. A workflow field update is defined on the Exec_Count_c field, to increment its value every time an account record is created or updated. The following trigger is defined on the account:
trigger ExecOrderTrigger on Account (before insert, before update, after insert, after update){ for (Account accountlnstance: Trigger.New){ if (Trigger . isBefore){ accountlnstance Exec_Count_c += 1; } System, debug (accountlnstance.Exec_Count_c); } }

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

Answer: C

 

NEW QUESTION 199
When testing batch classes, what must a developer do? (Choose two.)

  • A. Call the class* "execute" method
  • B. Limit the amount of records you test to < 200
  • C. Encapsulate code in Test.startTestQ and Test.stopTestQ
  • D. Use seeAIIData=true

Answer: B,C

Explanation:
Explanation
If you use "seeAIIData=true," you are a bad person

 

NEW QUESTION 200
Which of the following exceptions cannot be caught and will force an error? (Choose three.)

  • A. AssertException
  • B. DMLException
  • C. LimitException
  • D. License exceptions
  • E. SObjectExceptions
  • F. ListException

Answer: A,C,D

Explanation:
Explanation
Explanation/Reference:
SObjectException occurs when accessing a field not queried, or you try to change a field during the wrong dml statement (i.e. an edit-only field being set on insert) Custom exceptions must extend the "Exception" class

 

NEW QUESTION 201
An Apex trigger creates an Order__c record every time an Opportunity is won by a Sales Rep. Recently the trigger is creating two orders. What is the optimal method for a developer to troubleshoot this?

  • A. Turn off all Workflow Rules, then turn them on one at at time to see which one causes the error.
  • B. Set up debug logging for every Sales Rep, then monitor the logs for errors and exceptions.
  • C. Run the Apex Test Classes for the Apex trigger to ensure the code still has sufficient code coverage.
  • D. add system.debug() statements to the code and use the Developer Console logs to trace the code.

Answer: D

 

NEW QUESTION 202
Universal Containers has a Visualforce page that displays a table every Container_ c being rented by a gives Account.. failing because some of the customers rent over 100,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

  • A. Implement pagination with a StandardSetController.
  • B. Implement pagination with an OffsetController.
  • C. Use lazy loading and a transient List variable.
  • D. Use JavaScript remoting with SOQL Offset.

Answer: B

 

NEW QUESTION 203
A developer created a Lightning web component that uses a Lightning-record-edit-form to collect information about Leads. Users complain that they only see one error message at a time when they save a Lead record.
Which best practice should the developer use to perform the validations, and allow more than one error message to be displayed simultaneously?

  • A. Apex REST
  • B. Custom validation rules
  • C. Client-side validation
  • D. Process Builder

Answer: B

 

NEW QUESTION 204
Invokable methods accept sObjects as parameters

  • A. False
  • B. True

Answer: A

 

NEW QUESTION 205
What is a potential design issue with the following code?

  • A. The code will result in a System.DmException:Entity_is_Deleted error
  • B. SOQL could be avoided by creating a formula field for StageName in Account from the related Opportunity
  • C. The code will result in a System.LimitException: Apex CPU time limit exceeded error
  • D. The code will result in a System.LimitException : Too many script statements error

Answer: C

 

NEW QUESTION 206
When developing a Visualforce page that will be used by a global organization that does business in many languages and many currencies, which feature should be used? (Choose three.)

  • A. Custom Labels
  • B. convertCurrency()
  • C. getLocalCurrency()
  • D. Translation Workbenc
  • E. Global Labels

Answer: A,B,D

Explanation:
Explanation

 

NEW QUESTION 207
A developer is writing unit tests for the following method: public static Boolean isFreezing(String celsiusTemp) { if(String.isNotBlank(celsiusTemp) && celsiusTemp.isNumeric()) return Decimal.valueof(celsiusTemp) <= 0; return null; } Which assertion would be used in a negative test case?

  • A. System.assertEquals(null, isFreezing('asdf'));
  • B. System.assertEquals(true, isFreezing('lOO'));
  • C. System. assertEquals (true, isFreezing( ' 0');
  • D. System.assertEquals(true, isFreezing(null));

Answer: A

 

NEW QUESTION 208
A developer writes the following Apex trigger so that when a Case is closed, a single Survey record is created for that Case. The issue is that multiple Survey_c records are being created per Case.
trigger CaseTrigger on Case (after insert, after update){ List<Survey_c> createSurveys = new List<Survey_c>(); for (Case c : trigger.new){ if (c.IsClosed
&& (trigger.isInsert II trigger.isUpdate && trigger.oldMap.get(c.Id).IsClosed == false)){ createSurveys.add(new Survey_c(Case_c = c.Id)); } } insert createSurveys; } What could be the cause of this issue?

  • A. A user is creating the record as Closed
  • B. A user is editing the record multiple times
  • C. A workflow rule is firing with a Create Task action
  • D. A workflow rule is firing with a Field Update action

Answer: B

 

NEW QUESTION 209
A company has a native iOS app for placing orders that needs to connect to Salesforce to retrieve consolidated information from many different objects in a JSON format. Which is the optimal method to implement this in Salesforce?

  • A. Apex SOAP Web Service
  • B. Apex REST Web Service
  • C. Apex SOAP Callout
  • D. Apex REST Callout

Answer: B

 

NEW QUESTION 210
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 211
A developer needs to send Account records to an external system for backup purposes. The process must take a snapshot of Accounts as they are saved and then make a callout to a RESTful web service. The web service can only receive, at most, one record per call. Which feature should be used to implement these requirements?

  • A. Queueable
  • B. Process Builder
  • C. @future
  • D. workflow

Answer: B

 

NEW QUESTION 212
What is the transaction limit on the number of @future invocations?

  • A. There is no limit
  • B. 0
  • C. 1
  • D. 2
  • E. 3

Answer: C

Explanation:
Explanation/Reference:

 

NEW QUESTION 213
A developer wants to retrieve and deploy metadata, perform simple CSV export of query results, and debug Apex REST calls by viewing JSON responses. Which tool should the developer use?

  • A. Force.com Migration Tool
  • B. Workbench
  • C. Developer Console
  • D. Force.com IDE

Answer: B

 

NEW QUESTION 214
......

Get instant access to PDII practice exam questions: https://drive.google.com/open?id=1YJOYwGxU84XXzjXhJnyrf3161R8OMxYw

The best PDII exam study material and preparation tool is here: https://www.actual4dumps.com/PDII-study-material.html