subject

Adeveloper uses a before insert trigger on the lead object to fetch the territory__c object, where the territory__c. postalcode__c matches the lead. postalcode. the code fails when the developer uses the apex data loader to insert 10,000 lead records. the developer has the following code block: line-01: for (lead l : trigger. new){line-02: if (l. postalcode ! = null) {line-03: list terrlist = [select id from territory__c where postalcode__c = : l. postalcod; line-04: if(terrlist. size() > 0) line-05: l. territory__c = terrlist[.id; line-06: }line-07: }which line of code is causing the code block to fail?
a. line-03: a soql query is located inside of the for loop code.
b. line-01: trigger: new is not valid in a before insert trigger.
c. line-02: a nullpointer exception is thrown if postalcode is null.
d. line-05: the lead in a before insert trigger cannot be updated.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Which of the following is a way the operating system prevents unknown or unauthorized users from accessing the system?
Answers: 2
question
Computers and Technology, 22.06.2019 10:30
You are almost finished updating a web site. as part of the update, you have converted all pages from html 4.0 to html5. the project is currently on schedule. however, your project manager has been asked by the marketing team manager to justify a day of time spent validating the site's html5 pages. the marketing team manager does not have technical knowledge of the internet or the web. which is the most appropriate explanation to provide to the marketing team manager?
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Whose task it is to ensure that the product flows logically from one step to another?
Answers: 3
You know the right answer?
Adeveloper uses a before insert trigger on the lead object to fetch the territory__c object, where t...
Questions
question
Mathematics, 18.01.2021 20:30
question
Mathematics, 18.01.2021 20:30
question
Mathematics, 18.01.2021 20:30
question
Mathematics, 18.01.2021 20:30
question
History, 18.01.2021 20:30
Questions on the website: 13722362