Questions Flashcards
What 3 steps should be used to allow a custom SVG to be included in a Lightning Web Component?
Upload as a static resource
Import the static resource in your component’s JavaScript file
Reference the getter in your HTML template
A developer needs to include a Visualforce page in the detail section of a page layout for the Account object, but does not see the page as an available option in the Page Layout Editor.
What attribute must be included in <apex:page>?</apex:page>
standardController=”Account”
What should a developer do to determine which object type to cast from a list of sObjects?
Use getSObjectType to retrieve the sObject token
What two Apex data types can be used to reference a Salesforce record Id dynamically?
sObject
String
How can a developer identify the time taken by each process in a transaction in the Developer console?
Timeline tab under Execution Overview
What are the storage capacities of each sandbox type?
Developer - 200MB
Developer Pro - 1GB
Partial Copy - 5GB
Full Copy - same as Prod
What approach should a developer take to add a Maintenance Plan when an Opportunity is closed?
Build an Opportunity trigger that adds an OpportunityLineItem record
What is the requirement for a class to be used as a custom Visualforce controller?
Any top-level Apex class that has a default, no argument constructor
How should a developer prevent a recursive trigger?
Use a static Boolean variable
A developer needs to join to external records with parent records in Salesforce. The dataset does not have the Salesforce Ids of the parent records, but can identify the parent by a foreign key attribute. How can the records be related without knowing the Salesforce Id?
Create and populate a custom field on the parent of the type External Id
Which 3 options allow custom styling in a Visualforce page?
<apex:stylesheet>
Inline CSS
Static Resource
</apex:stylesheet>
Which 3 tools can deploy metadata to production?
Force.com IDE
Change Set from Sandbox
Metadata API
What does the Number field map to in Apex as a variable type?
Number maps to Decimal (not Integer, as Salesforce Number can define the decimal points as 0 or more)
A developer wants to override a button using Visualforce on an object. What is the requirement?
The standardController attribute must be set to the object (when overriding buttons you must use the standardController for the object on which the button appears)
What is true of static methods?
Initialized only when a class is loaded
Allowed only in outer classes
Excluded from the view state of a Visualforce page
What are valid controller options for a custom Visualforce page that will be used as a Dashboard component?
Custom controller
Custom controller with extensions
No controller
Reference page bound to the StandardSetController Class
What is true for @isTest annotation?
A method annotated @isTest(seeAllData=true) in a class @isTest(seeAllData=false) will see all org data
A method annotated @isTest(seeAllData=false) in a class @isTest(seeAllData=true) will see all or data
Profile are visible in a test class even if a class is annotated @isTest(seeAllData=false)
What are valid IN clauses for SOSL?
{Blank} or ALL FIELDS
EMAIL
NAME
PHONE
Where can a developer see overall code coverage?
Apex Classes setup page (Esimate code coverage)
Tests Tab in Developer Console
What two practices should be used for processing records in a trigger?
Use a Map to reduce the number of SOQL calls
Use a Set to ensure unique values in a query filter
What tag should a developer include when styling from external CSS in a Visualforce page?
apex:stylesheet
A developer can use the debug log to see what kinds of information?
Database changes
HTTP Callouts
Resources used by Apex
Automated Workflow Processes (not time-based)
How many levels of related records can be retrieved in a SOQL query?
1 level for Parent to Child
5 levels for Child to Parents, Grandparents
How can a developer get all the available Record Types for the current user on the Case object?
Use DescribeSObjectResult on the Case object, along with getRecordTypeInfos
In the event of an unhandled exception, an external system should be notified of the error - how can be done using publish/subscribe logic?
Publish the event using the Eventbus.publish() method and have the external system subscribe to the event using CometD