Practice Test for PDII Certification Real 2022 Mock Exam
Prepare For Realistic PDII Dumps PDF - 100% Passing Guarantee
How to book the PDII Exam
These are following steps for registering the PDII Exam. Step 1: Visit to Webassessor Exam Registration Step 2: Signup/Login to Webassessor Step 3: Select the onsite proctored or online proctored delivery method of Certification Exam Step 4: Select Date, time and confirm with a payment method
For more information, please click here.
Who should take the PDII exam
Salesforce Certified Platform Developer II Exam certification is an internationally-recognized validation that identifies persons who earn it as possessing skilled as a Salesforce Certified Platform Developer II. If a candidate wants significant improvement in career growth needs enhanced knowledge, skills, and talents. The Salesforce PDII Exam provides proof of this advanced knowledge and skill. If a candidate has knowledge of associated technologies and skills that are required to pass the Salesforce PDII Exam then he should take this exam.
NEW QUESTION 226
Which scenario requires a developer to use an Apex callout instead of Outbound Messaging?
- A. The Target system uses a SOAP API.
- B. The callout needs to be asynchronous.
- C. The callout needs to be invoked from a Workflow Rule.
- D. The Target system uses a REST API.
Answer: D
NEW QUESTION 227
A developer wrote an Apex class to make several callouts to an external system.
If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?
- A. Remote Site Settings
- B. Session Id
- C. Connected Apps
- D. Named Credentials
Answer: D
Explanation:
Explanation/Reference: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/ apex_callouts_named_credentials.htm
NEW QUESTION 228
A developer wrote a trigger on Opportunity that will update a custom Last Sold Date field on the Opportunity's Account whenever an Opportunity is dosed. In the test class for the trigger, the assertion to validate the Last Sold Date field fails.
What might be causing the failed assertion?
- A. The test class is not using System.runAs() to run tests as a Salesforce administrator.
- B. The test class has not re-queried the Account record after updating the Opportunity.
- C. The test class has not defined an Account owner when inserting the test data.
- D. The test class has not implemented seeAIIData-truwh the test method.
Answer: B
NEW QUESTION 229
Universal Containers (UC) wants to develop a customer community to help their customers log issues with their containers. The community needs to function for their German- and Spanish-speaking customers also.
UC heard that it's easy to create an international community using Salesforce, and hired a developer to build out the site.
What should the developer use to ensure the site is multilingual?
- A. Use Custom Metadata to translate custom picklist values.
- B. Use Custom Labels to ensure custom messages are translated property.
- C. Use Custom Settings to ensure custom messages are translated properly.
- D. Use Custom Objects to translate custom picklist values.
Answer: B
NEW QUESTION 230
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. Client-side validation
- B. Apex REST
- C. Process Builder
- D. Custom validation rules
Answer: D
NEW QUESTION 231 
Consider the Apex controller above, that is called from a Lightning Aura Component.
What is wrong with it?
- A. Line 8: method must first serialize the list to JSON before returning
- B. Line 6: method must be static
- C. Lines 1 and 6: class and method must be global
- D. Line 1: class must be global
Answer: B
NEW QUESTION 232
Which of the following about Dynamic Apex is incorrect?
- A. You can retrieve the sObject type from an Id by calling .getSObjectTypeQ
- B. Schema.getGlobalDescribeQ gives you a map of all sObject
- C. getDescribe() can get you a variety of info on a particular object/field
- D. In dynamic SOQL, you can use bind variables and bind variable fields
Answer: D
Explanation:
While you can use simple bind variables in dynamic SOQL, you cann|ot use bind variable fields (e.g. :myVariable.field1_c) Use escapeSingleQuotes to prevent SOQL injection
NEW QUESTION 233
A developer needs to store variables to control the style and behavior of a Lightning Web Component. Which feature should be used to ensure that the variables are testable in both Production and all Sandboxes?
- A. Custom Variable
- B. Custom Setting
- C. Custom Metadata
- D. Custom Object
Answer: C
NEW QUESTION 234
A company recently deployed a Visualforce page with a custom controller that has a data grid of information about Opportunities in the org.
Users report that they receive a ''Maximum view state size limit'' error message under certain conditions.
According to Visualforce best practice, which three actions should the developer take to reduce the view state? Choose 3 answers
- A. Use the transient keyword in the Apex controller for variables that do not maintain state.
- B. Use the private keyword in the controller for variables
- C. Refine any SQQL queries to return only data relevant to the page.
- D. Use the final keyword In the controller for variables that will not change.
- E. Use filters and pagination to reduce the amount of data.
Answer: A,C,E
NEW QUESTION 235
A developer receives complaints that the component loads slowly.
Which change can the developer implement to make the component perform faster?
- A. Change the default for showContacrlnfo to "false".
- B. Change the type of contactlnfo to "Map".
- C. Move the contents of <c: concacclnfo into the component.
- D. Add a change event handler for showContactinfo
Answer: A
NEW QUESTION 236
The REST API __________.
- A. Is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, queryAll, insert, update, upsert, or delete many records asynchronously by submitting batches
- B. Is used to retrieve, deploy, create, update, or delete customizations for your org. The most common use is to migrate changes from a sandbox or testing org to your production environment
- C. Is used to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to maintain passwords, perform searches, and much more
- D. Provides a powerful, convenient, and simple REST-based web services interface for interacting with Salesforce. Its advantages include ease of integration and development, and it's an excellent choice of technology for use with mobile applications and web projects
Answer: D
Explanation:
Explanation
NEW QUESTION 237
When developing a Lightning web component, which setting displays lightning-layout-items in one column on small devices, such as mobile phones, and in two columns on tablet-size and desktop-size screens?
- A. Set size-"12" medium-device-size="6"
- B. Set size-"12" tablet-device-size="6"
- C. Set size-"6" small-device-size="12"
- D. Set size=M6" mobile-device-size="12"
Answer: A
NEW QUESTION 238
What is a potential design issue with the following code?
trigger accountTrigger on Account (before update){ Boolean processOpportunity
= false; List<opportunity> opptysClosedLost = new List<opportunity>()
List<opportunity> IstAllOpp = [select StageName from Opportunity where
accountId IN :Trigger.newMap.keySet()]; if(!IstAllOpp.isEmpty())
processOpportunity = true; while(processOpportunity){ for(opportunity o :
IstAllOpp) if(o.StageName == 'Closed - Lost') opptysClosedLost.add(o);
processOpportunity = false; if(!opptysClosedLost.isEmpty()) delete
opptysClosedLost;
- A. The code will result in a System.DmlException:Entity_is_Deleted error
- B. The code will result in a System.LimitException : Too many script statements error
- C. The code will result in a System.LimitException: Apex CPU time limit exceeded error
- D. SOQL could be avoided by creating a formula field for StageName in Account from the related Opportunity
Answer: C
NEW QUESTION 239
A business requires that every parent record must have a child record. A developer writes an Apex method with two DML statements to insert a parent record and a child record.
A validation rule blocks child records from being created. The method uses a try/catch block to handle the DML exception.
What should the developer do to ensure the parent always has a child record?
- A. Set a database savepoint to rollback if there are errors.
- B. Use addError () on the parent record if an error occurs on the child record.
- C. Delete the parent record in the catch statement when an error occurs on the child record DML operation.
- D. Use Database.insert () and set the allorNone parameter to true.
Answer: A
NEW QUESTION 240
What Visualforce tag can be used to display custom messages in pages using the Salesforce Ul styling for errors, warnings, and other types of messages?
- A. <apex:pageMessage>
- B. <apex:customMessage>
- C. <apex:message>
- D. <apex:error>
Answer: A
NEW QUESTION 241
A company has many different unit test methods that create Account records as part of their data setup. A new required field was added to the Account and now all of the unit tests fail.
What is the optimal way for a developer to fix the issue?
- A. Add a before insert trigger on Account to set the value of the required field.
- B. Change the required field to be a validation rule that excludes the System Administrator profile.
- C. Add the required field to the data setup for all of the unit tests.
- D. Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.
Answer: D
NEW QUESTION 242
Which statement is true regarding both Flow and Lightning Process? (Choose two.)
- A. Are able to be embedded directly into Visualforce pages
- B. Can use Apex that implements the Process.Plugin interface
- C. Can use Apex methods with the @InvocableMethod annotation
- D. Are both server-side considerations in the Order of Execution
Answer: B,C
NEW QUESTION 243
A developer wants to use an Aura component with a custom action.
What should be considered in order to do this?
- A. The component's JavaScript controller must handle a method on initialization
- B. The component must implement the flexipage:availableForRecordHome interface
- C. A default value must be provided for each component attribute marked as required
- D. The class "slds-modal_ _container" must be added to the top-level element of the component
Answer: B
Explanation:
Explanation/Reference:
NEW QUESTION 244
What is a consideration when testing batch Apex? Choose 2 answers
- A. Test methods must call the batch execute () method once.
- B. Test methods must execute the batch with a scope size of less than 200 records.
- C. Test methods must run the batch between Test. startTest () and Test.stopTest
- D. Test methods must use the @isTest (SeeAllData=true) annotation.
Answer: B,C
NEW QUESTION 245
A company has a custom object Sales_Help_Request__c that has a Lookup relationship to Opportunity. The Sales_Help_Request__c has a number field, Number_of_Hours__c, that represents the amount of time spent on the Sales_Help_Request__c.
A developer is tasked with creating a field, Total_Hours__c, on Opportunity that should be the sum of all of the Number_of_Hours__c values for the Sales_Help_Request__c records related to that Opportunity.
What should the developer use to implement this?
- A. A trigger on the Opportunity object
- B. A workflow rule on the Sales_Help_Request__c object
- C. A roll-up summary field on the Opportunity object
- D. A trigger on Sales_Help_Request__c
Answer: A
NEW QUESTION 246
......
How much PDII Exam Cost
The price of the Salesforce Certified Platform Developer II (PDII) Exam is $200 USD.
Download PDII Exam Dumps Questions to get 100% Success: https://www.exams-boost.com/PDII-valid-materials.html
Check the Available PDII Exam Dumps with 395 QA's: https://drive.google.com/open?id=17TMteLWX77sRKs3_DWeSb3ePu_sWDs_B