Cgi - Salesforce Basics Concepts Evaluation 1

5 Questions

Settings
Please wait...
Salesforce Quizzes & Trivia

.


Questions and Answers
  • 1. 
    Why would a developer use Test.startTest() and Test.stopTest()?
    • A. 

      To avoid Apex code coverage requirements for the code between these lines.

    • B. 

      To start and stop anonymous block execution when executing anonymous Apex code

    • C. 

      To indicate test code so that it does not impact Apex line count governor limits

    • D. 

      To create an additional set of governor limits during the execution of a single test class

  • 2. 
    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: 01 for(Lead l : Trigger.new){02    if(l.PostalCode != null){03        List TerrList = [select Id FROM Territory__c WHERE PostalCode__c =: l.PostalCode];04        if(terrList.size() >0){05            l.Territory__c = terrList[0].Id;06        }07    }08 }Which line of code is causing the code block to fail?
    • A. 

      03: A SOQL query is located inside of the for loop code.

    • B. 

      01: Trigger.new is not valid in a before insert Trigger.

    • C. 

      02: a NullPointer exception is thrown if PostalCode is null.

    • D. 

      05: The Lead in a before insert Trigger cannot be updated

  • 3. 
    What must the Controller for a Visualforce page utilize to override the standard Opportunity view button?
    • A. 

      The standardSetController to support related lists for pagination

    • B. 

      The Opportunity StandardController for pre-built functionality.

    • C. 

      A callback constructor to reference the Standard Controller

    • D. 

      A constructor that initialises a private Opportunity variable

  • 4. 
    What would a developer do to update a picklist field on related Opportunity records when a modification to the associated Account record is detected?
    • A. 

      Create a process with Process Builder

    • B. 

      Create a workflow rule with field update

    • C. 

      Create a lightning component

    • D. 

      Create a visualforce page

  • 5. 
    Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers
    • A. 

      Create activities at multiple intervals

    • B. 

      Send an outbound message without Apex code

    • C. 

      Copy an account address to its contacts

    • D. 

      Submit a contract for approval