<< Prev Question Next Question >>

Question 46/100

A developer 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<Territory__c> terrList = [SELECT Id FROM Territory__c WHERE PostalCode__c = :l.PostalCode];Line-04: if(terrList.size() > 0) Line-05: l.Territory__c = terrList[0].Id; Line-06: }Line-07: }Which line of code is causing the code block to fail?

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Question List (100q)
Question 1: Which two platform features allow for the use of unsupported...
1 commentQuestion 2: If apex code executes inside the execute() method of an Apex...
Question 3: A developer tasked with creating a schema to track Movies, A...
Question 4: What is a benefit of the Lightning Component framework?Choos...
1 commentQuestion 5: In which two trigger types can a developer modify the new sO...
Question 6: How would a developer change the field type of a custom fiel...
Question 7: A company would like to send an offer letter to a candidate,...
1 commentQuestion 8: A developer wants to create a custom object to track Custome...
Question 9: The sales team at Universal Containers would like to see a v...
Question 10: What should be used to create scratch orgs?...
1 commentQuestion 11: The Review_c object have a lookup relationship to the job_Ap...
Question 12: An sObject named Application_c has a lookup relationship to ...
Question 13: A platform developer needs to implement a declarative soluti...
Question 14: Which two statements are acceptable for a developer to use i...
2 commentQuestion 15: The following Apex method is part of the ContactService clas...
1 commentQuestion 16: A developer executes the following query in Apex to retrieve...
Question 17: A developer creates an Apex helper class to handle complex t...
4 commentQuestion 18: Given the following block code: try{ List &lt;Accounts&gt; r...
Question 19: In the Lightning Component framework, where is client-side c...
Question 20: What is true of a partial sandbox that is not true of a full...
1 commentQuestion 21: A developer created a Visualforce page with a custom control...
Question 22: A developer in a Salesforce org with 100 Accounts executes t...
Question 23: An org has an existing Visual Flow that creates an Opportuni...
4 commentQuestion 24: What is the result of the debug statements in testMethod3 wh...
Question 25: What is a characteristic of the Lightning Component Framewor...
Question 26: When creating a record with a Quick Action, what is the easi...
1 commentQuestion 27: Which three code lines are required to create a Lightning co...
Question 28: developer created this Apex trigger that calls MyClass .mySt...
Question 29: What are the supported content sources for custom buttons an...
Question 30: Universal Containers requires Service Representatives to upd...
4 commentQuestion 31: A developer must implement a CheckPaymentProcessor class tha...
1 commentQuestion 32: The initial value for a number field on a record is 1. A use...
Question 33: Which Salesforce feature allows a developer to see when a us...
5 commentQuestion 34: A developer is debugging the following code to determinate w...
Question 35: Which governor limit applies to all the code in an apex tran...
Question 36: A developer has an integer variable called maxAttempts. The ...
Question 37: Manage package can be created in which type of org?...
Question 38: Which statement about change set deployments is accurate? (C...
1 commentQuestion 39: Given the code block: Integer x; For(x=0;x&lt;10; x+=2) { If...
Question 40: A developer created a Visualforce page and custom controller...
2 commentQuestion 41: Which exception type cannot be caught ?...
Question 42: Which scenario is invalid for execution by unit tests?...
Question 43: Which three steps allow a custom SVG to be included in a Lig...
Question 44: Which two condition cause workflow rules to fire? Choose 2 a...
1 commentQuestion 45: A developer is asked to create a custom visualforce page tha...
Question 46: A developer uses a before insert trigger on the Lead object ...
Question 47: A developer encounters APEX heap limit errors in a trigger. ...
Question 48: Which three data types can be returned from an SOQL statemen...
Question 49: A developer wrote a unit test to confirm that a custom excep...
Question 50: A platform developer needs to write an apex method that will...
Question 51: How should a developer make sure that a child record on a cu...
Question 52: How should a custom user interface be provided when a user e...
Question 53: A developer creates a custom controller and custom Visualfor...
Question 54: What would a developer do to update a picklist field on rela...
Question 55: Where can debug log filter settings be set?Choose 2 answers...
1 commentQuestion 56: A developer wants to display all of the available record typ...
3 commentQuestion 57: How many levels of child records can be returned in a single...
Question 58: A developer has javascript code that needs to be called by c...
Question 59: Which type of controller should a developer use to include a...
Question 60: A developer runs the following anonymous code block:List&lt;...
1 commentQuestion 61: A developer created an Apex trigger using the Developer Cons...
1 commentQuestion 62: Which two queries can a developer use in a Visualforce contr...
1 commentQuestion 63: For which three items can a trace flag be configured? (Choos...
Question 64: What are two testing consideration when deploying code from ...
2 commentQuestion 65: A developer is asked to set a picklist field to 'Monitor' on...
Question 66: custom picklist field, Food_Preference__c, exist on a custom...
2 commentQuestion 67: Candidates are reviewed by four separate reviewers and their...
Question 68: Application Events follow the traditional publish-subscribe ...
Question 69: What actions types should be configured to display a custom ...
Question 70: In the code below, which type does String inherit from? Stri...
1 commentQuestion 71: Universal Containers has large number of custom applications...
Question 72: A developer needs to provide a way to mass edit,update, and ...
Question 73: Which two operations can be performed using a formula field?...
Question 74: The sales management team requires that the lead source fiel...
Question 75: A developer working on a time management application wants t...
Question 76: Which action can a developer take to reduce the execution ti...
Question 77: Account acct = {SELECT Id from Account limit 1}; Given the c...
Question 78: The Sales Management team hires a new intern. The intern is ...
Question 79: A developer writes a before insert trigger.How can the devel...
Question 80: A developer is asked to create a PDF quote document formatte...
Question 81: A developer needs to create records for the object Property_...
Question 82: Which approach should a developer use to add pagination to a...
Question 83: A developer uses an 'after update' trigger on the Account ob...
4 commentQuestion 84: Which statement generates a list of Leads and Contacts that ...
Question 85: What is the maximum number of SOQL queries used by the follo...
Question 86: Which is a valid Apex assignment?...
Question 87: What is the return data type when ApexPages.currentPage().ge...
Question 88: Which code block returns the ListView of an Account object u...
1 commentQuestion 89: How can a custom type be identified as unique when added to ...
Question 90: Universal Containers (UC) uses a custom object called Vendor...
3 commentQuestion 91: A developer must create a Lightning component that allows us...
Question 92: To which primitive data type in Apex is a currency field ato...
Question 93: When using SalesforceDX, what does a developer need to enabl...
Question 94: Universal Containers wants to back up all of the data and at...
Question 95: A developer needs to include a Visualforce page in the detai...
3 commentQuestion 96: From which 2 locations can a developer determine the overall...
Question 97: A developer uses a Test Setup method to create an Account na...
Question 98: A developer needs an Apex method that can process Account or...
Question 99: A developer has the controller class below. (Exhibit) Which ...
Question 100: A developer needs to know if all tests currently pass in a S...