試験の準備方法-認定するPDII対応内容試験-一番優秀なPDII日本語版問題集優れた教育を受けなくても人々は大きな成功を収めることができ、成功した人が必要とするSalesforce資格は、専門的な認定を取得するための調査を通じて取得できます。したがって、適切なPDII実際のテストガイドがあなたを大いに助けてくれることを否定することはできません。したがって、PDIIトレーニングガイドは異なるバージョンのPDF、Soft、APPバージョンに対応しているため、PDII試験問題を強くお勧めします。問題なく試験に合格するのに役立ちます。 Salesforce Platform Developer II 認定 PDII 試験問題 (Q52-Q57):質問 # 52
Which method should be used to convert a Date to a String in the current user's locale?
A. String.format
B. Date. format
C. Date.paras
D. String.valueof
正解:B
質問 # 53
A developer created the following test method:
Java
@isTest(SeeAllData= true)
public static void testDeleteTrigger(){
Account testAccount = new Account(name = 'Test1');
insert testAccount;
List<Account> testAccounts = [SELECT Id, Name from Account WHERE Name like 'Test%']; System.assert(testAccounts.size() > 0); delete testAccounts; testAccounts = [SELECT Id, Name from Account WHERE Name like 'Test%']; System.assert(testAccounts.size() == 0);
}
The developer org has five accounts where the name starts with "Test". The developer executes this test in the Developer Console.
After the test code runs, which statement is true?
A. There will be five accounts where the name starts with "Test".
B. The test will fail.
C. There will be six accounts where the name starts with "Test".
D. There will be no accounts where the name starts with "Test".
正解:A
解説:
Every Apex test execution is treated as a temporary transaction. One of the most critical aspects of this execution is that any changes made to the database-including the insertion, modification, or deletion of records-are automatically rolled back at the end of the test run. This mechanism ensures that unit tests do not leave behind "garbage" data or alter the state of the organization's actual business data, maintaining a consistent environment for development and production.1234 In this specific scenario, the @isTest(SeeAllData=true) annotation is used, which allows the test method to view existing data in the organization. Bec5ause the org already contains five accounts starting with "Test," the test method sees them. When the test code inserts a new 6account named "Test1," the count within that specific transaction becomes six. The subsequent code queries for these six accounts an7d del8etes them.
While the test is running, the deletion is successful, which is why the assertion checking for zero accounts passes.
However, once the test finishes, the entire transaction is rolled back. The rollback effectively "undoes" the deletion of the original five accounts and the creation of the one new account. Consequently, the organization returns to its exact state from before the test was initiated. The five original accounts remain in the database as if the test never occurred, making option A the correct answer.
質問 # 54
A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.
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?
A. Add an <apex:actionsupport> within the <apex:selectOptions>.
B. Add an <apex:actionFunction> within the <apax:selecList>.
C. Add an <apex:actionFunction> within the <apex:selectOptions>.
D. Add an <apex:actionsupport> within the <apex:selecList>.
正解:D
質問 # 55
Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity's Account?
A)
B)
C)
D)
A. Option C
B. Option A
C. Option D
D. Option B
正解:B
質問 # 56
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?
A. Use the transient keyword in the Apex controller for variables that do not maintain state.
B. Use filters and pagination to reduce the amount of data.1819
C. Use the final keyword in the controller for variables that will not change.1617
D. Refine any SOQL queries to return only data relevant to the page.2021
E. Use the private keyword in the controller for variables.1415
正解:A、B、D
解説:
24
The Visualforc25e View State holds the state of the page (including controller variables) between server requests. It has a strict limit of 135KB. When a page handles large sets of data, like a grid of Opportunities, the view state can easily exceed this limit.
* Transient Keyword (Option A): This is the most effective programmatic way to reduce view state.
Marking a variable as transient prevents it from being serialized into the view state. This should be used for any data that is only needed for the current request and does not need to be maintained during a postback (e.g., large lists of records retrieved for a single display).
* Filters and Pagination (Option D): By using a StandardSetController or custom offset logic, the developer can limit the number of records held in memory at any given time. Instead of loading 5,000 Opportunities, the page can load and store only 20 records per page.
* Refine SOQL Queries (Option E): Developers often query "all" fields (e.g., SELECT * equivalent) or include large text areas that aren't displayed. By selecting only the specific fields required for the grid, the size of each object in the collection is reduced, directly lowering the view state.
Option B and C (private and final) affect variable visibility and immutability but do not prevent the variables from being serialized into the view state.