Salesforce PDII Real 2022 Braindumps Mock Exam Dumps
PDII Exam Questions | Real PDII Practice Dumps
NEW QUESTION 193
The "Webservice" keyword___________.
- A. Method must be static, and class must be global
- B. Can be used on all classes
- C. Used for any member variables included
- D. All of the above
Answer: D
NEW QUESTION 194
A developer is creating unit tests for code that makes SOAP web service callouts. The developer needs to insert some test data as a part of the unit tests setup. What are three actions to enable this functionality?
- A. Update code to call Test.setMock().
- B. Implement the HttpCalloutMock interface.
- C. Surround the callout with Test.startTest(), Test.stopTest().
- D. Implement the WebServiceMock interface.
- E. Surround the data insertion with Test.startTest(), Test.stopTest().
Answer: A,D
NEW QUESTION 195
Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-by-step wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERP_Number__c, that is then used in a query to find matching Accounts.
A developer receives the exception 'SOQL query not selective enough.
Which step should be taken to resolve the issue?
- A. Mark the lRP_Number__c field as an external ID.
- B. Perform the SOQL query as part of a for loop.
- C. Mark the ERP_Number__c field as required.
- D. Move the SOQL query to within an asyncronous process.
Answer: C
NEW QUESTION 196
What is the transaction limit for the number of DML statements allowed?
- A. 0
- B. 1
- C. 2,000
- D. 200 (synchronous), 100 (async)
- E. 100 (synchronous), 200 (async)
Answer: B
Explanation:
Explanation
Explanation/Reference:
Includes Approval functions, rollbacks/savepoints, and System.runAs
NEW QUESTION 197
A developer wrote an Apex method that makes an HTTP callout to an external system to get specialized data when a button is clicked from a custom Lightning web component on the Account record page.
Recently, users have complained that it takes longer than desired for the data to appear on the page after clicking the button.
What should the developer use to troubleshoot this issue?
- A. Devdoper Console
- B. Salesforce CU
- C. Event Logs
- D. Lightning Inspector
Answer: B
NEW QUESTION 198
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. Batch Apex, where Salesforce pushes data to and pulls data from the remote systems
- B. Call-in directly from each remote system to Salesforce APIs to push and pull the data
- C. Replication via third-party ETL to push data into Salesforce and pull data out in batches
- D. Salesforce Connect to push data to and pull data from the remote systems
Answer: D
NEW QUESTION 199
A developer is creating a Lightning web component to display a calendar. The component will be used in multiple countries. In some locales, the first day of the week is a Monday, or a Saturday, or a Sunday.
What should the developer do to ensure the calendar displays accurately for users in every locale?
- A. Use a custom metadata type to store key/value pairs.
- B. Query the FirstDayOfweek field from the Locale for the current user.
- C. Import the firstDayofWeek property in the component.
- D. Use Userinfor. getLocale () in the component.
Answer: D
NEW QUESTION 200
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 over each other, thus replacing entire Page Layouts and Workflows in Production
- B. Page Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.
- C. A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.
- D. The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.
Answer: A,C
NEW QUESTION 201
A company wants to build a custom Lightning Component that will display a specified Account Field Set and that can only be added to the Account record page.
Which design resource configuration should be used?
<design:component label="Account FS Component">
- A. <design:attribute name="fieldSetName" label="Field Set Name" />
<sfdc:objects>
<sfdc:object>Account</sfdc:object>
</sfdc:objects>
</design:component>
<design:component label="Account FS Component"> - B. <aura:attribute name="fieldSetName" label="Field Set Name" />
<sfdc:objects>
<sfdc:object>Account</sfdc:object>
</sfdc:objects>
</design:component> - C. <design:attribute name="fieldSetName" Label="Field Set Name" />
<sfdc:objects>
<sfdc:object>FieldSet</sfdc:object>
</sfdc:objects>
</design:component>
<design:component label="Account FS Component"> - D. <aura:attribute name="fieldSetName" label="Field Set Name" />
<sfdc:objects>
<sfdc:object>FieldSet</sfdc:object>
</sfdc:objects>
</design:component>
<design:component label="Account FS Component">
Answer: A
NEW QUESTION 202
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. Process Builder
- B. Custom validation rules
- C. Apex REST
- D. Client-side validation
Answer: D
NEW QUESTION 203
A developer has been asked to create code that will meet the following requirements:
Receives input of: Map<ld, Project_c), List<Account>
Performs a potentially long-running callout to an outside web service
Provides a way to confirm that the process executed successfully
Which asynchronous feature should be used?
- A. Queueable interface
- B. Database.AllowCallouts interface
- C. Cfuture (callout=true)
- D. Schedulable interface
Answer: A
NEW QUESTION 204
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. Remove line 06 from the Apex Controller and use firstName In the return.
- B. Change the argument from JSONObject to String.
- 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: A,B
NEW QUESTION 205
A developer wrote a class named AccountHistoryManager that relies on field history tracking. The class has a static method called getAccountHistory that takes in an Account as a parameter and returns a list of associated AccountHistroy object records.
The following test falls:
What should be done to make this test pass?
- A. The test method should be deleted since this code cannot be tested.
- B. Use test. Is Running test () in getAccountHostory () to conditionally return fake AccountHistory records.
- C. Create AccountHistory records manually in the test setup and write a query to get them.
- D. Use @istest (SeeAll Data=true) to see historical data from the org and query for AccountHistory records.
Answer: B
NEW QUESTION 206
A company represents their customers as Accounts in Salesforce. All customers have a unique Customer_Number__c that is unique across all of the company's systems. They also have a custom Invoice__c object, with a Lookup to Account, to represent invoices that are sent out from their external system. This company wants to integrate invoice data back into Salesforce so Sales Reps can see when a customer is paying their bills on time. What is the optimal way to implement this?
- A. Create a cross-reference table in the custom invoicing system with the Salesforce Account ID of each Customer and insert invoice data nightly.
- B. Query the Account Object upon each call to insert invoice data to fetch the Salesforce ID corresponding to the Customer Number on the invoice
- C. Ensure Customer_Number__c is an External ID and that a custom field Invoice_Number__c is an External ID and Upsert invoice data nightly.
- D. Use Salesforce Connect and external data objects to seamlessly import the invoice data into Salesforce without custom code.
Answer: C
NEW QUESTION 207
A developer is building a Lightning web component that searches for Contacts and must communicate the search results to other Lightning web components when the search completes.
What should the developer do to implement the communication?
- A. Fire an application event.
- B. Publish a message on a message channel.
- C. Publish an event on an event channel.
- D. Fire a custom component event.
Answer: B
NEW QUESTION 208
Universal Containers wants to use an external Web Service provided by a third-party vendor to validate that shipping and billing addresses are correct. The current vendor uses basic password authentication, but Universal Containers might switch to a different vendor who uses OAuth. What would allow Universal Containers to switch vendors without updating the code to handle authentication?
- A. Custom Setting (List)
- B. Dynamic Endpoint
- C. Custom Metadata
- D. Named Credential
Answer: D
NEW QUESTION 209
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 closed. 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 implemented seeAllData=true in the test method
- C. The test class has not defined an Account owner when inserting the test data
- D. The test class has not re-queried the Account record after updating the Opportunity
Answer: D
NEW QUESTION 210
A developer is trying to access org data from within a test class. Which sObject type requires the test class to have the (seeAllData=true) annotation?
- A. Profile
- B. Report
- C. RecordType
- D. User
Answer: B
NEW QUESTION 211
A developer is creating a Lightning web component that contains a child component. The property stage is being passed from the parent to the child. The public property is changing, but the setOppList function is not being invoked.
What should the developer change to allow this?
- A. Create a custom event from the parent component to set the property.
- B. Move the logic from connectedCalIback() to constructor().
- C. Move the logic from connectedCallback() nto renderedCallback().
- D. Move the logic to a getter/setter pair.
Answer: D
NEW QUESTION 212
.A developer is asked to update data in an org based on new business rules. The new rules state that Accounts with the type set to 'Customer' should have a status of 'Active,' and Accounts with the type set to 'Prospect' should have a status of 'Pending.' No other changes to data should be made. Which code block will accurately meet the business requirements?
A)
B)
C)
D)
- A. Option A
- B. Option C
- C. Option D
- D. Option B
Answer: C
NEW QUESTION 213
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. Apex Trigger
- B. Process Builder
- C. External JavaScript Library
- D. Apex REST
Answer: C
NEW QUESTION 214
A customer requires that when the billing address field on an Account gets updated, the address field on all its related contact records should reflect the same update.
How can this requirement be met with minimal customizations?
- A. Create a Workflow Rule on Account to update related child Contact records
- B. Create an After Trigger on Account to update its related contact records on update
- C. Create a Lightning Process on Account to update related child Contact records
- D. Create a scheduled batch job that updates all contact address fields based on the related account record
Answer: C
NEW QUESTION 215
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 accountInstance: Trigger.New){ if (Trigger
. isBefore){ accountInstance Exec_Count_c += 1; } System. debug
(accountInstance.Exec_Count_c); } }
- A. 2, 2, 3, 3
- B. 2, 2, 4, 4
- C. 1, 2, 3, 4
- D. 1, 2, 3, 3
Answer: B
NEW QUESTION 216
Part of a custom Lightning Component displays the total number of Opportunities in the org, which is in the millions. The Lightning Component uses an Apex Controller to get the data it needs.
What is the optimal way for a developer to get the total number of Opportunities for the Lightning Component?
- A. COUNT() SOQL aggregate query on the Opportunity object
- B. Apex Batch job that counts the number of Opportunity records
- C. SOQL for loop that counts the number of Opportunities records
- D. SUM() SOQL aggregate query on the Opportunity object
Answer: A
NEW QUESTION 217
A developer needs to implement a system audit feature that allows users, assigned to a custom profile named
"Auditors", to perform searches against the historical records in the Account object. The developer must ensure the search is able to return history records that are between 12 and 24 months old.
Given the code below, which select statement should be inserted below as a valid way to retrieve the Account History records ranging from 12 to 24 month old?
A)
B)
C)
D)
- A. Option A
- B. Option C
- C. Option D
- D. Option B
Answer: C
NEW QUESTION 218
......
For more info visit:
Salesforce Certified Platform Developer II (PDII) Exam Reference
Verified PDII Exam Dumps Q&As - Provide PDII with Correct Answers: https://www.actual4test.com/PDII_examcollection.html
Pass Your PDII Dumps Free Latest Salesforce Practice Tests: https://drive.google.com/open?id=1NvTSV745CXZgLuh73aRH1BL4EBX7hMqd