Programmatic Development Using Apex and Visualforce (DEX 450) Quiz Questions and Answers

Why would a developer use Test.startTest() and Test.stopTest()?

Answer :
  • To create an additional set of governor limits during the execution of a single test class.

What must the Controller for a VisualForce page utilized to override the standard Opportunity view button?

Answer :
  • The Opportunity StandardController for pre-built functionality 

A developer uses a before insert Trigger on the Lead object to fetch the Territory__c object, where the Territory.PostalCode__c matches the Lead.PostalCode. The code fails when the developer uses the Apex Data Loader to insert 10000 Lead records. The developer has the following code block for(Lead l : Tigger.new) { if(l.PostalCode != null) { List< Territory__c> terrList = [ SELECT Id FROM Territory__c where PostalCode__c =: lo.PostalCode ]; if(terrList.size() > 0) { l.Territory__c = terrList[0].id; } } }

Answer :
  • 03: A SQOL query is located inside of the for loop code

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

Answer :
  • Create a process with a process builder

Which requirement needs to be implemented using standard workflow instead of Process Builder? Choose 2 answers

Answer :
  • Create activities at multiple intervals 
  • Send outbound message without Apex code 

An org has a different Apex classes that provide Account-related functionality. After a new validation rule is added to the Account object, many of the test methods fail. What can be done to resolve failures and reduce the number of code changes needed in future validation rules? Choose 2 answers.

Answer :
  • Create a method that creates valid Account records, and call this method from within test methods. 
  • Create a method that loads valid Account records from static resource, and call this method within test methods

Which component is available to deploy using Metadata API? Choose 2 answers

Answer :
  • Case Layout
  • Account Layout 

In the code below, what type does Boolean inherit from? Boolean b = true

Answer :
  • Object

What is the preferred way of accessing web content such as images, stylesheets, JavaScript, and other libraries that is used in Visualforce pages?

Answer :
  • By uploading the content as a Static Resource.

A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to parent Account in Salesforce. Which kind of relationship would the developer use to relate the Account to the warehouse?

Answer :
  • Lookup