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