[Feb-2022] Latest Salesforce PDII Certification Practice Test Questions [Q169-Q190]

Share

[Feb-2022] Latest Salesforce PDII  Certification Practice Test Questions

Verified PDII Dumps Q&As - 1 Year Free & Quickly Updates


How much PDII Exam Cost

The price of the Salesforce Certified Platform Developer II (PDII) Exam is $200 USD.


Certification Path

Salesforce Platform Developer I, Superbadge Apex Specialist, Superbadge Data Integration Specialist, Superbadge Aura Components Specialist and Superbadge Advance Apex Specialist Certification can act as a prerequisite for this exam.

 

NEW QUESTION 169
A company requires an external system to be notified whenever an account is updated. What LimitException could the following code trigger? trigger AccountTrigger on Account (after update) { for (Account updatedAccount : Trigger.new) { AccountTriggerHelper.notinyxternalSystem(updatedAccount.id); } } public class AccountTriggerHelper { future(callout=true) public static void notinyxternalSystemlId accountId) { Account acc = [Select id, name from.Account where accountId = :accountId]; //Instantiate a new http object Http h = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint('http://example.org/restService'); req.setMethod('POST'); req.setBody(JSON.serialize(acc)); HttpResponse res = h.send(req); } }

  • A. System.LimitException: Too many future calls
  • B. System.LimitException: Too many SOQL queries
  • C. System.CalloutException: Callout from triggers are currently not supported
  • D. System.LimitException: Too many callouts

Answer: A

 

NEW QUESTION 170

A company has the Lightning Component above that allows users to dick a button to save their changes and redirects them to a different page. Currently, when the user hits the Save button the records are getting saved, but they are not redirected.
Which three techniques can a developer use to debug the JavaScript? Choose 3 answers

  • A. Enable Debug Mode for Lightning components for the user.
  • B. Use the browser's dev tools to debug the JavaScript.
  • C. Use consde.log() messages in the JavaScript.
  • D. Use Developer Console to view checkpoints.
  • E. Use Developer Console to view the debug log.

Answer: A,B,C

 

NEW QUESTION 171
A developer wants to use an Aura component with a custom action.
What should be considered in order to do this?

  • A. The class "slds-modal_ _container" must be added to the top-level element of the component
  • B. The component must implement the flexipage:availableForRecordHome interface
  • C. The component's JavaScript controller must handle a method on initialization
  • D. A default value must be provided for each component attribute marked as required

Answer: B

 

NEW QUESTION 172
What is the best practice to initialize a Visualforce page in a test class?

  • A. Use Test, setCurrentPage(Page.MyTestPage);
  • B. Use controller,currentPage, setPage (MyTestPage
  • C. Use Test.setCurrentpage,MyTestPage;
  • D. Use Test.currentpage, getParameter, put (MyTestPage);

Answer: A

 

NEW QUESTION 173
Universal Containers implements a private sharing model for the Convention_Attendee_ _ccustom object. As part of a new quality assurance effort, the company created an Event_Reviewer_ _cuser lookup field on the object. Management wants the event reviewer to automatically gain Read/Write access to every record they are assigned to.
What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?

  • A. Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers.
  • B. Create an After Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
  • C. Create a criteria-based sharing rule on the Convention Attendee custom object to share the records to a group of Event Reviewers.
  • D. Create a Before Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.

Answer: D

Explanation:
Explanation/Reference: https://help.salesforce.com/articleView?id=security_apex_sharing_reasons.htm&type=5

 

NEW QUESTION 174
A developer has generated Apex code from a WSDL for an external web service. The web service requires Basic authentication. What code should the developer use to authenticate?

  • A. Http. setHeader ( 'Authorization' , 'Basic QthZGprjpchVuIHNchFtZQ==');
  • B. Stub . inputhth-Ieader3_x.put ('Authorization' , 'Basic QthZGprjpchVuIHIQchE'tZQ:'
  • C. Http. setAuthentication( 'Basic QthZGprjpchVuIHNchFtZQ:'
  • D. Stub.authentication.put ( 'Authorization' , 'Basic QthZGprjpchVuIHNchFtZQ=='

Answer: B

 

NEW QUESTION 175
What is the transaction limit for the number of records per DML statement?

  • A. 50,000
  • B. 5,000
  • C. There is no limit
  • D. 20,000
  • E. 10,000

Answer: E

 

NEW QUESTION 176
What does the System. runAs () method enforce based on the target user?

  • A. Field-level permissions
  • B. Record sharing
  • C. License limits
  • D. Object CRUD permissions

Answer: B

 

NEW QUESTION 177
A developer created a Lightning web component that uses a Lightning-record-edit-force to collect information about Leads. Users complain that they only see one error message at a time when they save a Lead record.
What can the developer use to perform the validations, and allow multiple error messages to be displayed simultaneously?

  • A. Process Builder
  • B. Apex Trigger
  • C. Apex REST
  • D. External JavaScript Library

Answer: B

 

NEW QUESTION 178
A developer wants to create a Visualforce page that allows a user to search for a given account by Name. If the account is found, the account details should be populated on screen. If no account is found, an error message should be displayed to the user. How can this be accomplished? Choose 2 answers

  • A. Use the ApexPages.addMessage () method to add the error message.
  • B. Use the account.addError( ) method to add the error message.
  • C. Use the < apex:pageMessages > tag to display the error message.
  • D. Use the (apex: information) tag to display the error message.

Answer: A,C

 

NEW QUESTION 179
Exhibit:

What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
A)

B)

C)

D)

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

Answer: A

 

NEW QUESTION 180
A company accepts orders for customers in their enterprise resource planning (ERP) crder__c records with a lookup field to Account. The Account object has an External ID field, ERP_Customer_ID__c.
What should the integration use to create new Order__c records that will automatically be related to the correct Account?

  • A. Upsert on the Account and specify the ERP_Customer_ID__c.
  • B. Upsert on the Order__c object and specify the ERP_Customer_ID__c.
  • C. Insert on the Order__c object followed by an update on the Order__c object.
  • D. Merge on the Order__c object and specify the ERP_Customer_ID__c.

Answer: C

 

NEW QUESTION 181
What is the correct order of execution for Visualforce Page "get" requests (initial page visit)?

  • A. Evaluate constructors, extensions, and expression on attribute definitions on any custom components present
    2) Evaluate constructors on controller and extensions
    3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page
    4) If there's a <apex:form> element, create the view state
    5) Send HTML to Browser
  • B. Evaluate constructors on controller and extensions
    2) If there's a <apex:form> element, create the view state
    3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page
    4) Evaluate constructors, extensions, and expression on attribute definitions on any custom components present
    5) Send HTML to Browser
  • C. Evaluate constructors on controller and extensions
    2) Evaluate constructors, extensions, and expression on attribute definitions on any custom components present
    3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page
    4) If there's a <apex:form> element, create the view state
    5) Send HTML to Browser

Answer: C

 

NEW QUESTION 182
A company uses a custom-built enterprise resource planning (ERP) system to handle order management. The company wants Sales Reps to know the status of orders so that if a customer calls to ask about their shipment, the Sales Rep can advise the customer about the order's status and tracking number if it is already shipped.
Which two methods can make this ERP order data visible in Salesforce? Choose 2 answers

  • A. Write a cron job In Salesforce to poll the ERP system for order updates.
  • B. Ensure real-time order data is in Salesforce using the Streaming API.
  • C. Use Salesforce Connect to view real-time Order data in the ERP system.
  • D. Have the ERP system push the data into Salesforce using the SOAP API.

Answer: C,D

 

NEW QUESTION 183
Line 1 public class AttributeTypes Line 2 { Line 3 private final String[] arrayItems; Line 4 Line 5
@AuraEnabled Line 6 public List<String> getStringArray() { Line 7 Strings+ arrayItems = new String*+,
'red', 'green', 'blue' -; Line 8 return arrayItems; Line 9 } Line 10 } Consider the Apex controller above that is called from a Lightning Aura Component. What is wrong with it?

  • A. Line 6: method must be static
  • B. Lines 1 and 6: class and method must be global
  • C. Line 8: method must first serialize the list to JSON before returning
  • D. Line 1: class must be global

Answer: A

 

NEW QUESTION 184
UC Loans is a small company with a part time Salesforce administrator. UC Loans wants to create a Loan__c record whenever an Opportunity is won. What is the optimal solution for UC Loans to accomplish this?

  • A. Apex Trigger
  • B. Workflow Rule
  • C. Process Builder
  • D. Quick Action

Answer: C

 

NEW QUESTION 185
A developer must create a custom pagination solution for accessing approximately 2000 records and displaying 50 records on each page. Data from Salesforce will be accessed via an API and not via Apex.
How can the developer meet these requirements? (Choose two.)

  • A. Use CURSOR 50 in SOQL queries
  • B. Use LIMIT 50 in SOQL queries
  • C. Use a StandardSetController
  • D. Use OFFSET in SOQL queries

Answer: B,D

 

NEW QUESTION 186
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. Use the asyncSend() method of the HTTP class to send the request in async context.
  • B. Move the web service callout into an @future method.
  • C. Use Database.insert (order, true) to immediately commit any database changes.
  • D. Ensure all callouts are completed prior to executing DML statements.

Answer: B,D

 

NEW QUESTION 187
What is the output of the following code snippet? l Contact con = new Contact( LastName = 'Smith', Department = 'Admin'); 2 insert con; 3 4 Savepoint sp_finance = Database.setSavepoint(); 5 con.Department
'finance'; 6 update con; 7 8 Savepoint sp_hr = Database.setSavepoint(); 9 con.Department = 'HR'; 10 update con; 11 12 Database.rollback(sp_finance); l3 Database.rollback(sp_hr);

  • A. A runtime error will be thrown on line 13.
  • B. The contact record will be saved ME department value HR.
  • C. A runtime error will be thrown on line 12.
  • D. The contact record will be saved with department value Finance.

Answer: A

 

NEW QUESTION 188
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. 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
  • D. 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

Answer: C

Explanation:
Explanation

 

NEW QUESTION 189
A company's support process dictates that any time a Case is closed with a Status of 'Could not fix,' an Engineering Review custom object record should be created and populated with information from the Case, the Contact, and any of the Products associated with the Case. What is the correct way to automate this using an Apex trigger?

  • A. An after upsert trigger that creates the Engineering Review record and inserts it
  • B. A before update trigger that creates the Engineering Review record and inserts it
  • C. A before update trigger that creates the Engineering Review record and inserts it
  • D. An after update trigger that creates the Engineering Review record and inserts it

Answer: C

 

NEW QUESTION 190
......

Latest 2022 Realistic Verified PDII Dumps - 100% Free PDII Exam Dumps: https://www.actualvce.com/Salesforce/PDII-valid-vce-dumps.html

Get 2022 Updated Free Salesforce PDII Exam Questions & Answer: https://drive.google.com/open?id=1lv-jByfRWn8Z2-wxHO3xe-v5qU3yny-z