最新的Salesforce Platform Developer II - PDII免費考試真題

Consider the following code snippet:
HTML
<c-selected-order>
<template for:each={orders.data} for:item="order">
<c-order orderId={order.Id}></c-order>
</template>
</c-selected-order>
How should the <c-order> component communicate to the <c-selected-order> component that an order has been selected by the user?

正確答案: B
說明:(僅 Fast2test 成員可見)
public class searchFeature {
public static List<List<object>> searchRecords(string searchquery) {
return [FIND :searchquery IN ALL FIELDS RETURNING Account, Opportunity, Lead];
}
}
// Test Class
@isTest
private class searchFeature_Test {
@TestSetup
private static void makeData() {
//insert opportunities, accounts and lead
}
private static searchRecords_Test() {
List<List<object>> records = searchFeature.searchRecords('Test');
System.assertNotEquals(records.size(),0);
}
}
However, when the test runs, no data is returned and the assertion fails. Which edit should the developer make to ensure the test class runs successfully?

正確答案: C
說明:(僅 Fast2test 成員可見)
Which technique can run custom logic when a Lightning web component is loaded?

正確答案: C
說明:(僅 Fast2test 成員可見)
In an organization that has multi-currency enabled, a developer is tasked with building a Lighting component that displays the top ten Opportunities most recently accessed by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user's locale. What is the most effective approach to ensure values displayed respect the user's locale settings?1819

正確答案: A
說明:(僅 Fast2test 成員可見)
A business currently has a labor-intensive process to manually upload orders from an external OMS.
Accounts must be exported to get IDs to link the orders. Which two recommendations should make this process more efficient?

正確答案: C,D
說明:(僅 Fast2test 成員可見)
A company wants to run different logic based on an Opportunity's record type. Which code segment handles this request and follows best practices?

正確答案: C
說明:(僅 Fast2test 成員可見)
The Account object has a field, Audit_Code__c, that is used to specify what type of auditing the Account needs and a Lookup to User, Auditor__c, that is the assigned auditor. When an Account is initially created, the user specifies the Audit_Code__c. Each User in the org has a unique text field, Audit_Code__c, that is used to automatically assign the correct user to the Account's Auditor__c field.
Trigger:
Java
trigger AccountTrigger on Account (before insert) {
AuditAssigner.setAuditor(Trigger.new);
}
Apex Class:
Java
public class AuditAssigner {
public static void setAuditor(List<Account> accounts) {
for (User u : [SELECT Id, Audit_Code__c FROM User]) {
for (Account a : accounts) {
if (u.Audit_Code__c == a.Audit_Code__c) {
a.Auditor__c = u.Id;
}
}
}
}
}
What should be changed to most optimize the code's efficiency?

正確答案: B
說明:(僅 Fast2test 成員可見)
Part of a custom Lightning component displays the total number of Opportunities in the org, which are in the millions. The Lightning component uses an Apex method 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
說明:(僅 Fast2test 成員可見)
Consider the Apex class below that defines a RemoteAction used on a Visualforce search page.
Java
global with sharing class MyRemoter {
public String accountName { get; set; }
public static Account account { get; set; }
public MyRemoter() {}
@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?

正確答案: A
說明:(僅 Fast2test 成員可見)
There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once. What can a developer do to help alleviate such issues?

正確答案: C
說明:(僅 Fast2test 成員可見)

聯系我們

如果您有任何問題,請留下您的電子郵件地址,我們將在12小時內回复電子郵件給您。

我們的工作時間:( GMT 0:00-15:00 )
週一至週六

技術支持: 立即聯繫 

English 日本語 Deutsch 한국어