PD1 Cert Flashcards

1
Q

“Control layer” in the MVC model?

A
  1. Visualforce Controllers
  2. Apex Custom Controllers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

“My Domain” needs to be deployed if -→

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how to access a compound data type such as geolocation?

A

__s

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

“Application Events” vs “ Component Events”

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Examples of Limits enforced by “Apex Runtime”

A
  • time executing a SOQL query
  • total number of records retrieved by SOQL queries
  • CPU time per transaction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ways to run a “Flow” automatically in the future?

A
  • replace the autolaunched flow with a schedule triggered flow
  • invoke the flow from an Apex job that runs weekly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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 ?

A

flow builder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Things that can be created using the lightning app builder?

A
  • custom home pages
  • custom record pages
  • single-page apps
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

most appropriate place to put functions that can be called by any Javascript code

A

Helper file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Helper File =

Component File=

Controller File =

Design File=

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

events that are fired when an Aura component loads on a page

A
  • init
  • render
  • afterRender
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a “Batch Apex Job”?

A

-logic that can be set to run at regular intervals and perform the required logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Characteristics of a multi-tenant environment in context of platform upgrades

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

indirect lookup relationship?

A

links a child external object to a parent standard or custom object

*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

components that if a field is referenced, the reference should be deleted or updated first before the field can be deleted

A
  • apex class
  • apex trigger
  • visualforce page
  • visualforce component

workflow rule

  • field update
  • criteria based sharing rule
  • flow
  • jobs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

how to improve the speed of “Schema Builder” tool

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What should be used to create ‘Scratch Orgs’?

A

Salesforce CLI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Characteristics of @InvocableMethod

A
  • must be declared as static
  • only one method can be defined per Apex Class
  • method can be declared as public or global
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

how should a developer write unit tests for a private method in an Apex Class?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what should a developer do to check the code coverage of a class after running all tests?

A

view the Overall Code Coverage panel of the Tests tab in the developer console

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Characteristics of “ChangeSet Deployments”

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Scratch org

A

salesforce environment that can be easily created to support agile development and continuous integration

*Salesforce CLI is used to manage and create scratch orgs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What should a developer use to fix a lightning web component bug in a sandbox?

A

VS code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

define “Bulk API”

A

provides a programmatic option to asynchronously upload, query, or delete large data sets in your Salesforce org

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

random APEX characteristics:

A
  • classes are final by default
  • top-level class can only have one inner class level
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Valid “External ID” data types/fields

A
  • number
  • text
  • email
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Characteristics of Debug Logs

A
  • 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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

which three data types can a SOQL query return?

A
  • integer
  • sObject
  • List
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

how to use “External ID” to relate records:

A

-add related records by using a custom External ID field on the parent record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

if you have more than one trigger that is defined on an object for the same event, can the order of execution be guaranteed?

A

NO, order of Execution cannot be guaranteed in this scenario

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

how does the lightning component framework help developers implement solutions faster?

A

by providing device awareness for mobile and desktops

**keyword in the question was Lightning Component Framework

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

what is the purpose of Unit Tests (using the @isTest functionality)

A

verifying whether a particular piece of code is working properly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Getter & Setter method characteristics:

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

characteristics in regards to governor limits of a execute() method of an Apex class the implements Batchable Interface

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

operations that can be performed using a formula field?

A
  • displaying an image based on the opportunity amount
  • calcualting a score on a lead based on the information from another field
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

what do we use Apex Getter and Setter methods for?

A

when we want to refer to Apex class variables in a Visualforce page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

which tools run a script that “deploys” to a sandbox?

A
  • VSCode
  • SFDX CLI
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

which tools run a script that “deploys” to a sandbox?

A
  • VSCode
  • SFDX CLI
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

max recursive trigger stack depth? (governor limits)

A

16 stacks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

what tools can you use for custom user interfaces in Salesforce Classic vs Lightning?

A

Salesforce Classic -→ Visualforce page

Lightning -→ Lightning Component or Visualforce page (obviously lightning component is the preference)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

phases in the Salesforce Aura Application Event propagation framework?

A
  • Capture
  • Bubble
  • Default
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

where to find information about the status of batch or future events?

A
  • Apex Flex Queue
  • Apex Jobs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

what to remember when debugging a database.insert() exception?

A

database.insert() has a return type of “SaveResult” that can be used for debugging

44
Q

what happens when you try to assign a list variable to something that is not a list variable?

A

exception

45
Q

Formula’s characteristics:

A
  • formulas can reference values in related objects
  • formulas are calculated at runtime and are not stored in the database
46
Q

ways to ensure field-level security is applied while using Apex?

A
  • .stripInaccessible (****preferred)
  • WITH SECURITY_ENFORCED clause on SOQL
  • describefieldresult class and its method inAccessible
47
Q

in a SOQL query if you don’t generate/create an aggregate function an alias, what does the alias become

A

expri

*where i denotes the order of the aggregated files with no explicit alias, i starts at 0

*aggregate functions -→ AVG(),SUM(),MAX(),MIN(),COUNT(),COUNT_DISTINCT()

48
Q

steps that allow a custom SVG to be included in a Lightning web Component?

A
  • Reference the getter in the HTML template
  • import the static resource and provide a getter for it in Javascript
  • upload the SVG as a static resource
49
Q

which annotation exposes an Apex class as a RESTful web service?

A

@RestResource

50
Q

Trigger “Best Practices” in Salesforce?

A
  • one trigger per object
  • context-specific handler methods (or helper classes)
  • bulkify your code
51
Q

techniques to prevent SOQL “injection”

A

-String.escapeSingleQuotes()

-static queries with Bind variables

  • type casting
  • replacing characters
  • allowlisting
52
Q

Test coverage standards:

A

-75% code coverage on Apex classes

-1% code coverage on Apex triggers(atleast one line of code for your trigger)

-75% code coverage across org(classes & triggers combined)

53
Q

Governor Limits:

A
  • 100 synchronous SOQL queries / 200 asynchronous SOQL queries
  • 150 DML statements
  • 20 SOSL queries (search terms)
  • 50000 records (retrieved by SOQL queries)
  • 10000 records (using Database. class functionality)
  • 2000 records (number of records retrieved by a single SOQL query)
  • 16 (recursive stack depth)
  • 100 HTTP callouts in a transaction
54
Q

three lines of code required to create a Lightning component on a Visualforce page?

A

$Lightning.createComponent

$Lightning.use

55
Q

security consideration in regards to using Lightning Data Service?

A

-lightning data service handles sharing rules and field-level security

56
Q

which tool should a developer use to troubleshoot the causes of performance issues when a custom page loads in their org?

A

Developer console

57
Q

Characteristics for Aura component events?

A
  • event propagates to every owner in the containment heirarchey
  • if a container component needs to handle a component event, add a handleFacets=”true” attribute to its handler
58
Q

relationship queries use ? (related objects)

A

__r

*child object is plural

59
Q

sharing access to a junction object record is -→

A

determined by a user’s sharing access to both associated master records

60
Q

how to specify mock responses in Testing HTTP Callouts in Apex?

A
  • by implementing the HttpCalloutMock interface (*preferred)
  • by using static resources with StaticResourceCalloutMock
61
Q

how to use Callouts in triggers?

A

invoke callouts from triggers by encapsulating the callouts in @future methods

*Move the callout to an asynchronous method with @future(callout=true) annotation

62
Q

what tool should you use to prevent a user from editing a field on a record after certain criteria are met?

A

validation rule

63
Q

how can a developer check the test coverage of active process builder and flows before deploying them in a change set?

A

use SOQL and the Tooling API

64
Q

things that present a security vulnerability on Visualforce pages and/or controllers?

A

-setting escape =”false”

*escape should be set =“true”

65
Q

which three items can a trace flag be configured for?

A
  • Apex Class
  • Apex Trigger
  • User
66
Q

characteristics of exposing the Lightning Web Components?

A
  • IsExposed() attribute set to true on the XML file
  • specify the Target where the component can be added(such as a lightning page)
67
Q

what type of method can be called from a Flow?

A

@InvocableMethod

68
Q

what should a developer use to script the deployment and unit test execution as part of continuous Integration?

A

Salesforce CLI

69
Q

some operations that can affect the number of times a trigger can fire?

A
  • workflow rules
  • flows
  • roll-up summary fields
70
Q

Execute Anonymous Block basic definition :

A

where Apex code can be ran that doesn’t get stored as metadata, but that can be compiled and executed

71
Q

what does the Lightning Component Framework provide to developers?

A

prebuilt components that can be reused

72
Q

which sandbox type supports performance testing, load testing, and staging?

A

Full Sandbox

73
Q

how should a custom user interface be provided when a user edits an Account in Lightning Experience?

A

Override the accounts edit button with a Lightning Component

74
Q

to use @wire to call an Apex method -→

A

annotate method with @AuraEnabled(cacheable=true)

*method must be static, global, or public

75
Q

which Visualforce feature supports a list button that will display a Visualforce page that allows users to edit multiple records?

A

RecordSetVar attribute

76
Q

3 ways for a developer to execute tests in an org?

A
  • setup menu
  • tooling API
  • Salesforce DX
77
Q

how to monitor the progress of a Queueable Apex job?

A
  • Apex jobs page
  • query the AsyncApexJob object
78
Q

benefits of using declarative customizations over code?

A
  • generally require less maintenance
  • automatically update with each salesforce release
  • have more flexibility related to limits (not that they have different limits than code)
79
Q

if a class doesn’t DECLARE with sharing or without sharing -→

A

sharing is inherited

80
Q

which sfdc commands can be used to add testing data to a Developer Sandbox?

A
  • Force:data:bulk:upsert
  • Force:data:tree:import
81
Q

Resources in an Aura component that can contain Javascript functions?

A
  • Renderer
  • Controller
  • Helper
82
Q

characteristics of Custom Exceptions in Apex?

A
  • class name must end with ‘Exception’
  • custom exception class must extend the system Exception class
  • class can implement one or many interfaces
83
Q

when testing using existing data in for example a sandbox for testing using (@isTest(SeeAllData=True)) what might happen?

A

test may FAIL in the Test Framework because your using existing data

84
Q

best practices when it comes to Aura component and application event handling?

A
  • reuse the event logic in a component bundle, by putting the logic in the helper
  • handle low-level events in the event handler and re-fire them as higher-level events
85
Q

which two settings must be defined in order to update a record of a junction object?

A
  • read/write access on the primary relationship
  • read/write access on the secondary relationship
86
Q

enforcing object and field-level permissions

A

look for “Schema” keyword and

isUpdateable() -→ updating context

isCreateable() -→ creating context

isAccessible() -→ check permissions context

isDeletable() -→ deleting context

87
Q

field data types that can be External Id

A
  • number
  • text
  • email
88
Q

capabilities of the <1tng:require> tag when loading Javascript resources in Aura Components?

A
  • specifying loading order
  • one-time loading for duplicate scripts
  • loading scripts in parallel
89
Q

which salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?

A

Event Monitoring Log

90
Q

master-detail field from _______ to _______

A

master-detail field from child to parent

91
Q

when using Salesforce Dx, what does a developer need to enable to create manage scratch orgs?

A

Dev Hub

92
Q

the Enhance Element from Einstein Best Action Returns a ____

A

list of recommendations -→ List>

*must be called with an @InvocableMethod

93
Q

what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component based development over Visualforce?

A
  • rich component ecosystem
  • self-contained and reusable units of an application
94
Q

how to back up all of the data and attachments in the Salesforce org once a month?

A

Data Export Scheduled job

95
Q

code that displays the contents of a Visualforce page as a PDF

A

apex:page renderAs=”pdf:

96
Q

example of class the implement a custom SOAP Web Service

A

global class Webservice Class{

private Boolean helperMethod(){/*implementation…*/}

webservice static String updateRecords(){/*implementation…*/}

97
Q

to embed a flow in your Aura Component, add the

A

lightning:flow component to it

98
Q

benefits of developing applications in a multi-tenant environment?

A

enforced best practices for development

99
Q

Apex Interface characteristics:

A
  • method implementation can be defined within the apex interface
  • apex class must be declared using the interface keyword
  • a method defined in an Apex Interface cannot have an access modifier
100
Q

Salesforce resources that can be accessed from a Lightning Web Component

A
  • static resources
  • SVG resources
  • Content asset files
101
Q

which module provides access to methods for subscribing to a streaming channel and listening to event messages

A

lighting/empApi

102
Q

how to find a users “default” record type?

A

Opportunity.SObjectType.getDescribe().getRecordTypeInfos()

*iterate thought them until isDefaultRecordTypeMapping() = true

103
Q

standard apex:page configuration attributes

A

standardController

extensions

action

104
Q

name some asynchronous tools

A
  • batchable
  • queuable
  • Bulk API
105
Q

Virtual keyword

A

provide the derived classes with the option of overriding them