PDII 試験問題を無料オンラインアクセス
| 試験コード: | PDII |
| 試験名称: | Platform Developer II |
| 認定資格: | Salesforce |
| 無料問題数: | 163 |
| 更新日: | 2026-10-13 |
A developer created a Lightning web component that allows users to input a text value that is used to search for Accounts by calling an Apex method. The Apex method returns a list of AccountWrappers and is called imperatively from a JavaScript event handler.
Java
01: public class AccountSearcher {
02:
03: public static List<AccountWrapper> search(String term) {
04: List<AccountWrapper> wrappers = getMatchingAccountWrappers(term);
05: return wrappers;
06: }
07:
08:
09: public class AccountWrapper {
10: public Account account { get; set; }
11: public Decimal matchProbability { get; set; }
12: }
13: // ...other methods, including getMatchingAccountWrappers implementation...
14: }
Which two changes should the developer make so the Apex method functions correctly?
The test method calls an @future method that increments a value. The assertion is failing because the value equals 0. What is the optimal way to fix this?
Java
@isTest
static void testIncrement() {
Account acct = new Account(Name = 'Test', Number_Of_Times_Viewed__c = 0); insert acct; AuditUtil.incrementViewed(acct.Id); // This is the @future method Account acctAfter = [SELECT Number_Of_Times_Viewed__c FROM Account WHERE Id = :acct.Id][0]; System.assertEquals(1, acctAfter.Number_Of_Times_Viewed__c);
}
As part of point-to-point integration, a developer must call an external web service which, due to high demand, takes a long time to provide a response. As part of the request, the developer must collect key inputs from the end user before making the callout. Which two elements should the developer use to implement these business requirements?4647
A Visualforce page loads slowly due to the large amount of data it displays. Which strategy can a developer use to improve the performance?
A developer implemented a custom data table in a Lightning web component with filter functionality.
However, users are submitting support tickets about long load times when the filters are changed. The component uses an Apex method that is called to query for records based on the selected filters. What should the developer do to improve performance of the component?