PDI試験無料問題集「Salesforce Platform Developer I (PDI) 認定」
Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional layer of validation using automation.
What would be the best solution for this requirement?
What would be the best solution for this requirement?
正解:C
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
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?
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?
正解:C,D
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)