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, 23.06.2019 23:40
Which of the following calculates the total from the adjacent cell through the first nonnumeric cell by default, using the sum function in its formula? -average -autosum -counta -max
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Afashion designer wants to increase awareness about her brand. which network can she use and why she can use the blank to blank her products online. answers for the first blank: internet, extranet, or intranet answers for the second blank: market, design, and export
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Who introduced the concept of combining artificial and natural light in the studio
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
What type of forensic evidence was recovered during the bomb set off at the new mexico facility on the video that was similar to the evidence obtained at the boston bombings and how did the evidence allow the researchers to connect other pieces of evidence to the same bomb?
Answers: 2
You know the right answer?
Adeveloper uses a before insert trigger on the lead object to fetch the territory__c object, where t...
Questions
Questions on the website: 13722360