PD1 study Flashcards
What is contained in an Aura component bundle?
Component, controller, helper, style, documentation, renderer, design, svg
How many levels deep can an inner class be?
1
What class is the isAccessible() method from?
Describe field result class
Can you perform a callout after a DML operation?
No, this is not allowed and will throw an ‘uncommited work pending’ error.
What does the runAs() method enforce?
record sharing NOT field permissions or permissions
How is executeAnonymous call run? (system or user context)
Always run in user context
Methods to prevent SOQL injection
Static queries with bind variables
String.escapeSingleQuotes()
Type casting
Replacing characters
Allowlisting
On access modifiers
Global - can be used anywhere in the org
- must be used for web service callouts
Public - makes apex class accessible to code within the same packages
Protected - can only be used on class methods
Private - cannot be used on top level classes
In order to propagate destructive changes from one org to another using the ant migration tool the xml file must specify
- Name of the metadata component member
- Name of the component metadata type
Cascading triggers
- Part of the same execution context
- occur when a trigger triggers another trigger
- no limit on number of triggers than can be executed
How to ensure that a visualforce page uses lightning experience styling
The ‘lightningStylesheets’ attribute must be set to true in the <apex: page> tag
Preferred method to include JavaScript files in visualforce pages
Save it as a static resource and reference via <apex:includeScript> tag</apex:includeScript>
Ways to invoke a flow
Flow.Interview.FlowName.start();
Flow.Interview.createInterview(‘[FlowName]’,params).start();
What is the maximum number of records that can be processed by a trigger at a time?
200
Methods of preventing SOQL injection
Static queries with bind variables
String.escapeSingleQuotes()
Typecasting
Replacing characters
Allowlisting
What is the security vulnerability if ‘escape = false’ is used in a visualforce page
Cross-site scripting (XSS)
How to ensure that a visualforce page uses lightning experience styling
Set the ‘lightningStylesheets’ attribute to true in the <apex:page> tag</apex:page>
Component and application events in aura
Component -
Bubble (child to parent)
capture (parent to child)
Application
default
To embed a screen flow on a lightning web component
use the <lightning-flow> tag into the lwcs markup</lightning-flow>
Ordering of init events in an aura app
Innermost (child) to outermost (parent)
What does the header contain in a debug log?
Api version, log category and log level
Available perspectives in the debug log
All
Debug - contains Execution log, source and variables panels
Log only - Execution log only
Analysis - Includes the Stack tree, execution stack, Execution log and Execution overview panels
Debug log categories
DBs
Callouts
Apexcode
Validation
Workflow
Profiling
Visualforce
System
Wave
What does the heap and symbols tab show
Heap
Types - Shows the objects that were instantiated and the memory consumed in bytes
Instances - Shows the instances of a particular object type
States - Shows the objects fields and values at a particular checkpoint
Symbol
The symbols tab shows all symbols in memory at a checkpoint using a treeview `