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 23:50
You need to design a circuit that implements the functions in the following table: s0 s1 function0 0 a + 10 1 a – b1 0 a + b1 1 a – 1s0 and s1 are 1-bit control inputs to select the function of the circuit. inputs a and b are 4-bitnumbers in 2s complement form. the output is also a 4-bit number in 2s complement form.you are allowed to use only one ttl 7483 4-bit adder to implement all the functions. but anynumber of other components (except the adder) can be used.hint: design a combinational logic circuit to modify the input b and the “carry input” of theadder depending on the control inputs s0 and s1.important: lab grade will depend on the working of the circuit & will be checked of by your labinstructor.1. is the output valid for the following input combinations: a. s0 = 0, s1 = 0, a = 7, b = 3? b. s0 = 0, s1 = 1, a = 7, b = 3? c. s0 = 1, s1 = 0, a = -4, b = -5? d. s0 = 1, s1 = 1, a = -8, b = 6? 2. what is the range of inputs (for both a and b) that will produce the valid output for all the functions?
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Knowing that the central portion of link bd has a uniform cross sectional area of 800 mm2 , determine the magnitude of the load p for which the normal stress in link bd is 50 mpa. (hint: link bd is a two-force member.) ans: p = 62.7 kn
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
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
Social Studies, 25.01.2021 18:50
question
Mathematics, 25.01.2021 18:50
question
Physics, 25.01.2021 18:50
question
History, 25.01.2021 18:50
Questions on the website: 13722363