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?
A. Use SOSL to query the records on filter change.1
B. Use a4 selective SOQL query with a custom index.
C. Return all records into a list when the component is created and filter the array in JavaScript.3
D. Use setStorable() in the Apex method to store the response in the client-side cache.2
正解:B
解説: (Pass4Test メンバーにのみ表示されます)
質問 2:
A developer is building a Lightning web component that retrieves data from Salesforce and assigns it to the record property:
JavaScript
import { LightningElement, api, wire } from 'lwc';
import { getRecord } from 'lightning/uiRecordApi';
export default class Record extends LightningElement {
@api fields;
@api recordId;
record;
}
What must be done in the component to get the data from Salesforce?
A. Add @api(getRecord, { recordId: '$recordId', fields: '$fields' }) above record.
B. Add @wire(getRecord, { recordId: '$recordId' }) above record.
C. Add @api(getRecord, { recordId: '$recordId' }) above record.
D. Add @wire(getRecord, { recordId: '$recordId', fields: '$fields' }) above record.
正解:D
解説: (Pass4Test メンバーにのみ表示されます)
質問 3:
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 AccountHistory object records. The following test fails:
Java
@isTest
public static void testAccountHistory(){
Account a = new Account(name = 'test');
insert a;
a.name = a.name + '1';
update a;
List<AccountHistory> ahList = AccountHistoryManager.getAccountHistory(a); System.assert(ahList.size() > 0);
}
What should be done to make this test pass?
A. Use @isTest(SeeAllData=true) to see historical data from the org and query for AccountHistory records.
B. Use Test.isRunningTest() in getAccountHistory() to conditionally return fake AccountHistory records.
C. Create AccountHistory records manually in the test setup and write a query to get them.
D. The test method should be deleted since this code cannot be tested.
正解:B
解説: (Pass4Test メンバーにのみ表示されます)
質問 4:
Refer to the Aura component below:
HTML
<aura:component>
<aura:attribute name="contactInfo" type="Object"/>
<aura:attribute name="showContactInfo" type="boolean" default="true"/>
<aura:handler name="init" value="{!this}" action="{!c.init}"/>
<aura:if isTrue="{!v.showContactInfo}">
<c:contactInfo value="{!v.contactInfo}"/>
</aura:if>
</aura:component>
A developer receives complaints that the component loads slowly. Which change can the developer implement to make the component perform faster?
A. Change the default for showContactInfo to "false".
B. Change the type of contactInfo to "Map".
C. Move the contents of <c:contactInfo> into the component.
正解:A
解説: (Pass4Test メンバーにのみ表示されます)
質問 5:
Which method should be used to convert a Date to a String in the current user's locale?
A. Date.parse
B. String.valueOf
C. String.format
D. Date.format
正解:D
解説: (Pass4Test メンバーにのみ表示されます)
質問 6:
Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer. Recently a record-triggered flow was added to update a date field. Since the addition of the flow, two Account Plan records are created. What might cause this to happen?
A. The Apex trigger is not bulk safe and calls insert inside of a for loop.
B. The flow is configured to use an 'Update Records' element.
C. The flow is configured to evaluate when a record is created and every time it is edited.
D. The Apex trigger does not use a static variable to ensure it only fires once.
正解:D
解説: (Pass4Test メンバーにのみ表示されます)
質問 7:
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 certain conditions are met. What is the optimal way to accomplish this?
A. Use SingleEmailMessage() with an Apex trigger.
B. Use MassEmailMessage() with an Apex trigger.
C. Use an Email Alert with Flow Builder.
D. Use an Apex trigger with Batch Apex.
正解:C
解説: (Pass4Test メンバーにのみ表示されます)
905 お客様のコメント
クリック」





Aizawa -
PDIIの内容は問題数も増えた感じで内容も充実しているし、JS-Dev-101早速勉強していきたいと思います!