CRT-450 Practice Test practice questions, page 11 of 18, with answer review and explanations.
Question 51
A developer is asked to set a picklist field to `˜Monitor' on any new Leads owned by a subnet of Users. How should the developer implement this request?
Create an after insert Lead trigger.
Create a before insert Lead trigger.
Create a Lead Workflow Rule Field Update.
Create a Lead formula field.
Question 52
Why would a developer consider using a custom controller over a controller extension?
To increase the SOQL query governor limits.
To implement all of the logic for a page and bypass default Salesforce functionality
To leverage built-in functionality of a standard controller
To enforce user sharing settings and permissions
Question 53
A developer wants to override a button using Visualforce on an object. What is the requirement?
The controller or extension must have a PageReference method.
The standardController attribute must be set to the object.
The action attribute must be set to a controller method.
The object record must be instantiated in a controller or extension.
Question 54
A lead object has a custom field Prior_Email__c. The following trigger is intended to copy the current Email into the Prior_Email__c field any time the Email field is changed: Which type of exception will this trigger cause?
A null reference exception
A compile time exception
A DML exception
A limit exception when doing a bulk update
Question 55
How should a developer create a new custom exception class?
public class CustomException extends Exception{}
CustomException ex = new (CustomException)Exception();
public class CustomException implements Exception{}