Salesforce Platform Developer II PDII Real Dumps Questions

Are you interested in Salesforce Certified Platform Developer II (PDII) Exam? The Salesforce Platform Developer II program is designed for individuals who would like to demonstrate their skills and knowledge in advanced programmatic capabilities of the Lightning Platform and data modeling to develop complex business logic and interfaces. When doing the preparation of PDII exam, we highly recommend PDII dumps questions with real exam questions and answers online. The great PDII real dumps questions are verified and proved by the professional team and successful candidates.

Come to read Salesforce PDII free dumps first.

1. A Visualforce page loads slowly due to the large amount of data it displays.

Which strategy can a developer use to improve the performance?

2. Universal Containers wants to use a Customer Community with Customer Community Plus licenses so their customers can track how many containers they are renting and when they are due back. Many of their customers are global companies with complex Account hierarchies, representing various departments within the same organization. One of the requirements is that certain community users within the same Account hierarchy be able to see several departments’ containers, based on a junction object that relates the Contact to the various Account records that represent the departments.

Which solution solves these requirements?

3. 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?

4. A company has a Lightning Page with many Lightning Components, some that cache reference data. It is reported that the page does not always show the most current reference data.

What can a developer use to analyze and diagnose the problem in the Lightning Page?

5. A company has code to update a Request and Request Lines and make a callout to their external ERP system's REST endpoint with the updated records.

The CalloutUtil.makeRestCallout fails with a 'You have uncommitted work pending. Please commit or rollback before calling out' error.

What should be done to address the problem?

6. A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.

<apex:selectList value="{!selectedIndustry}">

<apex:selectOptions values="{!industries}"/>

</apex:selectList>

When a user changes the value in the industry select list, the table of Accounts should be automatically updated to show the Accounts associated with the selected industry.

What is the optimal way to implement this?

7. The test method above calls a web service that updates an external system with Account information and sets the Account’s Integration_Updated__c checkbox to True when it completes.

The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts. "

What is the optimal way to fix this?

8. A developer created and tested a Visualforce page in their developer sandbox, but now receives reports that users are encountering ViewState errors when using it in Production.

What should the developer ensure to correct these errors?

9. Refer to the component code above.


The information displays as expected (in three rows) on a mobile device.

However, the information is not displaying as desired (in a single row) on a desktop or tablet.

Which option has the correct component changes to display correctly on desktops and tablets?

10. 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?

11. A company processes Orders within their Salesforce instance. When an Order’s status changes to 'Paid' it must notify the company’s order management system (OMS). The OMS exposes SOAP web service endpoints to listen for when to retrieve the data from Salesforce.

What is the optimal method to implement this?

12. Consider the Apex controller above, that is called from a Lightning Aura Component.

What is wrong with it?

13. An Apex class does not achieve expected code coverage. The testSetup method explicitly calls a method in the Apex class.

How can the developer generate the code coverage?

14. A developer is trying to decide between creating a Visualforce component or a Lightning component for a custom screen.

Which functionality consideration impacts the final decision?

15. A developer wishes to improve runtime performance of Apex calls by caching results on the client.

What is the best way to implement this?

16. 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?

17. What is a benefit of JavaScript remoting over Visualforce Remote Objects?

18. A Lightning Component functions in preview mode and needs to be used inside a Lightning App Builder page, but it is not available.

What change should be applied to the component?

19. Recently a Salesforce org's integration failed because it exceeded the number of allowed API calls in a 24-hour period. The integration handles a near real-time, complex insertion of data into Salesforce.

The flow of data is as follows:

- The integration looks up Contact records with a given email address and, if found, the integration adds a Task to the first matching Contact it finds.

- If a match is not found, the integration looks up Lead records with a given email address and, if found, the integration adds a Task to the first matching Lead it finds.

- If a match is not found, the integration will create a Lead and a Task for that newly created Lead.

What is one way in which the integration can stay near real-time, but not exceed the number of allowed API calls in a 24-hour period?

20. 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?

21. A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to production, an outside integration is periodically reporting errors.

Which change should the developer make to ensure the integration is not affected with minimal impact to business logic?

22. An environment has two Apex Triggers: an after-update trigger on Account and an after-update trigger on Contact. The Account after-update trigger fires whenever an Account’s address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact’s state.

Consider the following: A mass update of 200 Account records’ addresses, where each Account has 50 Contacts. Each Contact has 1 Campaign Member. This means there are 10,000 Contact records across the Accounts and 10,000 Campaign Member records across the contacts.

What will happen when the mass update occurs?

23. 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?

24. A user receives the generic "An internal server error has occurred" while interacting with a custom Lightning Component.

What should the developer do to ensure a more meaningful message?

25. Consider the Apex class above that defines a RemoteAction used on a Visualforce search page.

global with sharing class MyRemoter {

public String accountName { get; set; }

public static Account account { get; set; }

public AccountRemoter() {}

@RemoteAction

global static Account getAccount(String accountName) {

account = [SELECT Id, Name, NumberOfEmployees

FROM Account WHERE Name = :accountName];

return account;

}

}

Which code snippet will assert that the remote action returned the correct Account?

26. A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page.

Which component should be added to the Visualforce page to display the message?

27. A developer is writing code that requires making callouts to an external web service.

Which scenario necessitates that the callout be made in an @future method?

28. A developer wants to call an Apex Server-side Controller from a Lightning Aura Component.

What are two limitations to the data being returned by the Controller? (Choose two.)

29. Which interface needs to be implemented by a Lightning Component so that it may be displayed in modal dialog by clicking a button on a Lightning Record page?

30. Sometimes events on Salesforce need to be handled by an external system due to the scale or type of process being executed. Consider the use case of a user in Salesforce needing to get pricing for an order they are building in Salesforce while on the phone with a customer.

The pricing logic already exists in a third-party system. Instead of recreating this logic in Salesforce, it will be leveraged by making a request of the third-party system. The response, in this case the pricing, will be returned and stored back in Salesforce.

What is the optimal solution?

31. What are three benefits of using declarative customizations over code? (Choose three.)

32. Which use case can only be performed by using asynchronous Apex?

33. The test method above calls an @future method that increments the Number_of_Times_Viewed__c value. The assertion is failing because the Number_of_Times_Viewed__c equals 0.

@isTest

static void testIncrement() {

Account acct = new Account(Name = 'Test');

acct.Number_Of_Times_Viewed__c = 0;

insert acct;

AuditUtil.incrementViewed(acct.Id);

Account acctAfter = [SELECT Number_Of_Times_Viewed__c FROM Account WHERE Id =

:acct.Id][0]

System.assertEquals(1, acctAfter.Number_Of_Times_Viewed__c);

}

What is the optimal way to fix this?

34. A company represents their customers as Accounts that have an External ID field called Customer_Number__c. They have a custom Order (Order__c) object, with a Lookup to Account, to represent Orders that are placed in their external order management system (OMS). When an order is fulfilled in the OMS, a REST call to Salesforce should be made that creates an Order record in Salesforce and relates it to the proper Account.

What is the optimal way to implement this?

35. What are three benefits of using static resources in Visualforce and Lightning Components? (Choose three.)

36. 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?

37. A company has a custom object, Sales Demo Request, that has a lookup to an Opportunity. It is required that a Sales Demo Request record be created when an Opportunity’s Probability is greater than 50%.

What is the optimal way to automate this?

38. 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?

39. 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?

40. A company wants to incorporate a third-party web service to set the Address fields when an Account is inserted, if they have not already been set.

What is the optimal way to achieve this?

41. Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?

42. Which two relationship queries use the proper syntax? (Choose two.)

43. A developer built a Component to be used at the front desk for quests to self-register upon arrival at a kiosk. The developer is now asked to create a Component for the Utility Tray to alert Users whenever a guest has arrived at the front desk.

What should be used?

44. Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity’s Account?

45. An Apex Trigger creates a Contract record every time an Opportunity record is marked as Closed and Won. This trigger is working great, except (due to a recent acquisition) historical Opportunity records need to be loaded into the Salesforce instance.

When a test batch of records is loaded, the Apex Trigger creates Contract records. A developer is tasked with preventing Contract records from being created when mass loading the Opportunities, but the daily users still need to have the Contract records created.

What is the most extendable way to update the Apex Trigger to accomplish this?

46. Business rules require a Contact to always be created when a new Account is created.

What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?

47. Consider the above trigger intended to assign the Account to the manager of the Account’s region.

trigger AssignOwnerByRegion on Account ( before insert, before update )

{

List<Account> accountList = new List<Account>();

for( Account anAccount : trigger.new )

{

Region__c theRegion = [

SELECT Id, Name, Region_Manager__c

FROM Region__c

WHERE Name = :anAccount.Region_Name__c

];

anAccount.OwnerId = theRegion.Region_Manager__c;

accountList.add( anAccount );

}

update accountList;

}

Which two changes should a developer make in this trigger to adhere to best practices? (Choose two.)

48. Which two of the examples above have correct System.debug statements? (Choose two.)

Example 1:

AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM

Opportunity GROUP BY CampaignId];

for (AggregateResult ar : groupedResults)

{

System.debug('Campaign ID' + ar.get('CampaignId'));

System.debug('Average amount' + ar.get('expr0'));

}

Example 2:

AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) theAverage

FROM Opportunity GROUP BY CampaignId];

for (AggregateResult ar : groupedResults)

{

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 : groupedResults)

{

System.debug('Campaign ID' + ar.get('CampaignId'));

System.debug('Average amount' + ar.get.AVG());

}

07B13F58239056B81577933EB624485B

Example 4:

AggregateResult[] groupedResults = [SELECT CampaignId, 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);

}

49. Which method should be used to convert a Date to a String in the current user’s locale?

50. A company has a custom object, Order__c, that has a required, unique, external ID field called Order_Number__c.

Which statement should be used to perform the DML necessary to insert new records and update existing records in a List of Order__c records?

51. A company uses an external system to manage its custom account territory assignments. Every quarter, millions of Accounts may be updated in Salesforce with new Owners when the territory assignments are completed in the external system.

What is the optimal way to update the Accounts from the external system?

52. 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?

53. What is the optimal technique a developer should use to programmatically retrieve Global Picklist options in a Test Method?

54. A company has a web page that needs to get Account record information, given its Salesforce record ID, from JavaScript on the page and then display it.

Which method of integration is optimal?

55. 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 two.)

56. A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields.

However, the users want to pick the five fields to use as filter fields when they run the page.

Which feature of Apex code is required to facilitate this solution?

57. Universal Containers uses Big Objects to store almost a billion customer transactions called

Customer_Transaction__b.

These are the fields on Customer_Transaction__b:

Account__c

Program__c

Points_Earned__c

Location__c

Transaction_Date__c

The following fields have been identified as Index Fields for the Customer_Transaction__b object: Account__c, Program__c, and Transaction_Date__c.

Which SOQL query is valid on the Customer_Transaction__b Big Object?

58. 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?

59. A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow.

What can a developer to do address the issue?

60. A developer is asked to build a solution that will automatically send an email to the Customer when an Opportunity stage changes. The solution must scale to allow for 10,000 emails per day. The criteria to send the email should be evaluated after all Workflow Rules have fired.

What is the optimal way to accomplish this?


 

The most updated ADM-201 Dumps For your Administration Essentials for New Admins exam
Salesforce CPQ Admin Essentials for Experienced Administrators CPQ-211 Dumps

Add a Comment

Your email address will not be published. Required fields are marked *