PD1 Cert Flashcards
“Control layer” in the MVC model?
- Visualforce Controllers
- Apex Custom Controllers
“My Domain” needs to be deployed if -→
Lightning components need to be used in Lightning tabs, Lightning Pages, as standalone apps, as actions and action overrides, or as custom lightning page templates
how to access a compound data type such as geolocation?
__s
“Application Events” vs “ Component Events”
Application Events -→ allow all components on a page, regardless of the containing component, to respond to an event
Component Events -→ can only be handled by components in the firing components containment hierarchey
Examples of Limits enforced by “Apex Runtime”
- time executing a SOQL query
- total number of records retrieved by SOQL queries
- CPU time per transaction
ways to run a “Flow” automatically in the future?
- replace the autolaunched flow with a schedule triggered flow
- invoke the flow from an Apex job that runs weekly
what tool can be used to create a wizard like interface where details can be entered on one screen and a calculation displayed on the next screen ?
flow builder
Things that can be created using the lightning app builder?
- custom home pages
- custom record pages
- single-page apps
most appropriate place to put functions that can be called by any Javascript code
Helper file
Helper File =
Component File=
Controller File =
Design File=
Helper File = most appropriate place to put functions that can be called by any Javascript code in a component bundle
Component File = contains the markup for the component
Controller File = contains functions that are typically called as a result of a browser or platform event
Design File = exposes attributes of the component that can be modified from an interface such as lighting app builder
events that are fired when an Aura component loads on a page
- init
- render
- afterRender
What is a “Batch Apex Job”?
-logic that can be set to run at regular intervals and perform the required logic
Characteristics of a multi-tenant environment in context of platform upgrades
- salesforce upgrades are automatic
- sandboxes are upgraded prior to production environments so that the changes can be previewed and tested
- all customizations are specified as metadata, allowing for easy upgrades
indirect lookup relationship?
links a child external object to a parent standard or custom object
*
components that if a field is referenced, the reference should be deleted or updated first before the field can be deleted
- apex class
- apex trigger
- visualforce page
- visualforce component
workflow rule
- field update
- criteria based sharing rule
- flow
- jobs
how to improve the speed of “Schema Builder” tool
- the map can be used to navigate objects of interest
- if the “hide relationships” option is selected, performance is improved
- the filter can be used to only display objects of interest
What should be used to create ‘Scratch Orgs’?
Salesforce CLI
Characteristics of @InvocableMethod
- must be declared as static
- only one method can be defined per Apex Class
- method can be declared as public or global
how should a developer write unit tests for a private method in an Apex Class?
use the “@Test Visible” annotation
@TestVisible -→ annotation allows test methods to access private or protected members of another class outside the test class (members include methods, member variables, and inner classes)
what should a developer do to check the code coverage of a class after running all tests?
view the Overall Code Coverage panel of the Tests tab in the developer console
Characteristics of “ChangeSet Deployments”
Change set -→ can be used to send customizations from one Salesforce org to another
- Changesets can only be used between related organizations
- deployment is done in a one-way, single transaction
- sending a changes between two orgs requires a deployment connection
Scratch org
salesforce environment that can be easily created to support agile development and continuous integration
*Salesforce CLI is used to manage and create scratch orgs
What should a developer use to fix a lightning web component bug in a sandbox?
VS code
define “Bulk API”
provides a programmatic option to asynchronously upload, query, or delete large data sets in your Salesforce org
random APEX characteristics:
- classes are final by default
- top-level class can only have one inner class level
Valid “External ID” data types/fields
- number
- text
Characteristics of Debug Logs
- the amount of information logged in the debug log can be controlled by the “log level”
- to view Debug logs, “Manage Users” or “View All Data” permission is needed
- Debug log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO, WARN, and ERROR fields
(NONE-→ERROR-→WARN-→INFO-→DEBUG-→FINE-→FINER-→FINEST)
which three data types can a SOQL query return?
- integer
- sObject
- List
how to use “External ID” to relate records:
-add related records by using a custom External ID field on the parent record
if you have more than one trigger that is defined on an object for the same event, can the order of execution be guaranteed?
NO, order of Execution cannot be guaranteed in this scenario
how does the lightning component framework help developers implement solutions faster?
by providing device awareness for mobile and desktops
**keyword in the question was Lightning Component Framework
what is the purpose of Unit Tests (using the @isTest functionality)
verifying whether a particular piece of code is working properly
Getter & Setter method characteristics:
- Getter methods return values from a controller. Every value that is calculated by a controller and displayed on a page must have a corresponding getter method, including any Boolean variables
- Setter methods pass user-specified values from page markup to a controller. Any setter methods in a controller are automatically executed before any action methods
- getter method is always required to access values from a controller, setter method is not always necessary to pass values into a controller
- no guaranteed order in which Apex methods (such as getter, setter) and variables are processed by a controller extension
characteristics in regards to governor limits of a execute() method of an Apex class the implements Batchable Interface
- the apex governor limits are reset for each iteration of the execute() method
- the apex governor limits might be higher due to the asynchronous nature of the transaction
operations that can be performed using a formula field?
- displaying an image based on the opportunity amount
- calcualting a score on a lead based on the information from another field
what do we use Apex Getter and Setter methods for?
when we want to refer to Apex class variables in a Visualforce page
which tools run a script that “deploys” to a sandbox?
- VSCode
- SFDX CLI
which tools run a script that “deploys” to a sandbox?
- VSCode
- SFDX CLI
max recursive trigger stack depth? (governor limits)
16 stacks
what tools can you use for custom user interfaces in Salesforce Classic vs Lightning?
Salesforce Classic -→ Visualforce page
Lightning -→ Lightning Component or Visualforce page (obviously lightning component is the preference)
phases in the Salesforce Aura Application Event propagation framework?
- Capture
- Bubble
- Default
where to find information about the status of batch or future events?
- Apex Flex Queue
- Apex Jobs