Salesforce Platform Developer I (PDI) - PDI 模擬練習

A developer identifies the following triggers on the ' Expense_c ' object:
deleteExpense, applyDefaultsToExpense, validateExpenseUpdate;
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices are followed?
Choose 2 answers

正解: B,D
解説: (PassTest メンバーにのみ表示されます)
Management asked for opportunities to be automatically created for accounts with annual revenue greater than $1,000$. A developer created the following trigger on the Account object to satisfy this requirement.
for (Account a: Trigger.new) {
if (a.AnnualRevenue > 1000000) {
List < Opportunity > oppList = [SELECT Id FROM Opportunity WHERE accountId = :a.Id]; if(oppList.size() == 0) { Opportunity oppty = new Opportunity{Name = a.name, StageName = ' Prospecting ' , CloseDate = system.today().addDays(30)}; insert oppty;
}
}
}
Users are able to update the account records via the UI and can see an opportunity created for high annual revenue account. However, when the administrator tries to upload a list of 179 accounts using Data Loader, it fails with System.Exception errors.
Which two actions should the developer take to fix the code segment shown above?

正解: B,C
解説: (PassTest メンバーにのみ表示されます)
While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors.
Why did the method fail in the sandbox test framework but succeed in the Developer Console?

正解: D
解説: (PassTest メンバーにのみ表示されます)
Which two are phases in the Aura application event propagation framework?
Choose 2 answers

正解: B,D
解説: (PassTest メンバーにのみ表示されます)
Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript button that was being used to create records with prepopulated values.
What can the developer use to accomplish this?

正解: D
解説: (PassTest メンバーにのみ表示されます)
A custom picklist field, ' Food_Preference_c ' , exists on a custom object. The picklist contains the following options: ' Vegan ' , ' Kosher ' , ' No Preference ' . The developer must ensure a value is populated every time a record is created or updated.
What is the optimal way to ensure a value is selected every time a record is saved?

正解: B
解説: (PassTest メンバーにのみ表示されます)
Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy the code and associated configurations to the Production environment.
What is the recommended process for deploying the code and configurations to Production?

正解: B
解説: (PassTest メンバーにのみ表示されます)
A Lightning component has a wired property, ' searchResults ' , that stores a list of Opportunities.
Which definition of the Apex method, to which the ' searchResults ' property is wired, should be used?

正解: B
解説: (PassTest メンバーにのみ表示されます)