Home
Browse
Create
Search
Log in
Sign up
Upgrade to remove ads
Only $2.99/month
Platform Developer I
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
Salesforce Fundamentals: 7% Data Modeling and Management: 13% Process Automation and Logic: 38% User Interface: 25% Testing, Debugging, and Deployment: 17%
Terms in this set (192)
Salesforce Platform
Group of technologies that supports the development of other technologies on top of it
Supports custom functionality built by customers and partners
Heroku
Gives developers the power to build highly scalable web apps and back-end services with Ruby, Python, Go and more
Built on AWS
Mobile SDK
Suite of technologies that lets you build native, HTML5, and hybrid apps that have the same reliability and security as the Salesforce app
Metadata-Driven Development Model
Platform is metadata-aware, so it can auto-generate significant part of the user experience for you
Pre-built functionality
Schema Builder
Can see entity-relationship model in action
Provides coders and non-coders with easy way to visualize and configure app's data model
Declarative Development
Refers to point-and-click functionality in Salesforce. It means that you can configure and customize Salesforce without writing code.
Uses less time to develop and move faster
1. Workflow Rules
2. Process Builder
3. Flow
Lightning Component Framework
UI development framework for desktop and mobile.
Component-based approach to UI development.
Works with mobile devices
Use JavaScript on the client-side (action takes place on the client's computer) and Apex on the server-side (action takes place on a web server)
Includes
1. Component (.cmp) file
2. Controller (.js)
Apex
Used to extend Salesforce functionality, is similar to C#
Saved, compiled, and executed directly on the Lightning Platform
Object-oriented, so supports encapsulation, abstraction, inheritance, and polymorphism
1. Every object has representation via Apex class that provides functionality to interact with the database
2. Must have 75% test coverage to deploy Apex code to production org
3. No solution, project, or config file
4. Class library is smaller than .NET Framework
Visualforce
Lets you create and customize pages in Salesforce as well as integrate with other standard web technologies, including HTML, CSS, and JavaScript
Developing entire pages at once - stored as ApexPage
Framework for rendering HTML pages using an MVC paradigm
Includes:
1. yourPageName.page
2. yourPageName.page-meta.xml
Salesforce Lightning Design System (SLDS)
Lets you style your pages so they match the look and feel of Salesforce's new Lightning Experience interface
Use <apex:tagName>
XML Markup for Aura Components
Aura component tags and static HTML tags are seen
Uses <namespace:tagName> convention for its tags
Apex Controller
Use Apex server-side controllers
SOAP API
Integrate your org's data with other applications using standard SOAP protocols.
REST API
Access objects in your org using standard REST protocols.
Metadata API
Manage customizations in your org and build tools that manage your metadata model.
Tooling API
Build custom development tools for platform applications.
Marketing Cloud API
Expose Marketing Cloud capabilities with the REST API and get comprehensive access to most email functionality with the SOAP API.
Bulk API
Load, delete, and perform asynchronous queries on large data sets.
Streaming API
Send and receive notifications securely and efficiently. Notifications can reflect data changes in your org, or custom events.
Chatter API
Build UI for Chatter, Communities, Recommendations, Files, Topics, and more.
Internet of Things (IoT)
The network of products embedded with connectivity-enabled electronics
Can integrate Salesforce to monitor the performance status of your customer's devices and define business logic that supports customer engagement
Heroku Connect
Unifies Salesforce data with Postgres data
Process Builder
Behind the scenes automation (when user input is not needed)
Types include:
1. Record change: (most common), record is created or edited
2. Invocable: called by another process
3. Platform event: platform event message is received
Actions Include:
1. Create a record
2. Update any related record
3. Use a quick action to create a record, update a record, or log a call
4. Launch a flow
5. Send an email
6. Post to Chatter
7. Submit for approval
8. Call apex methods
Can schedule actions at the specific time - SFDC makes sure the associated criteria node still evaluates to true Based on:
Specific date/time field on the record in the process
The time that the process ran (i.e. 3 days from now)
Cannot grab the ID of the created record and use it elsewhere, but CAN do that with a flow
Best practice to create one process for each object - otherwise, SFDC cannot guarantee which runs first
Can update child records when the parent record is updated
Flow
Automated business process that can execute logic, interact with SFDC database, call Apex classes, and collect data from users
Uses connectors, elements, and resources
Can update, create, get, delete records
Can send core actions like emails, submit for approval, create chatter post, etc.
Use when functionality cannot be achieve through process builder or when requirement is too complex for it
Can perform most core actions like submit for approval, send email, create chatter post, etc.
Data Import Wizard
Input: CSV File, deal with 1 object per import
Need record ID
Use when:
1. Loading up to 50,000 records
2. Want to prevent duplicates by uploading records according to account name and site, contact email address, or lead email address
Tool lets you import data in common standard objects, such as contacts, leads, accounts as well as data in custom objects
Cannot import Users
Provides simple interface to specify the configuration parameters, data sources, and the field mappings that map the field names in your import file
Data Loader
Input: CSV File, only can deal with 1 object per import
Needs Record ID field
Use when you need to:
1. Load 50,000 to 5 million records (if need to load more work with SFDC partner or visit AppExchange)
2. Load into an object not supported by Data Import Wizard
3. Schedule regular data loads such as nightly imports
4. Export data for backup purposes - can schedule daily with command line
Can be operated either through user interface or command line, processes records with SOAP APfI; if using command line, need to specify data sources, field mappings, and other parameters via configuration lines
Makes it possible to automate import process using API calls
Can also export using this service
If used outside of trusted IP ranges, need user and password and security token
Can hard delete records, upload docs and links into content libraries, and upload attachments
Lightning Platform
Software-as-a-Service (SaaS) platform that relies on metadata-driven architecture
Tightly integrated with database, which enables you to build apps super fast
Gets UI, security, and reporting right in the platform
Don't need to worry about upgrading, tuning, or scaling
UI framework for developing SPAs for mobile and desktop devices
Programming models:
1. Lightning Web Components
2. Aura Components
Apex Class
Template or blueprint from which objects are created
Apex Data Types
1. Integer
2. Double
3. Long
4. Date
5. Datetime
6. String - always treated like primitive value type
7. Boolean
8. ID (for 18 character)
9. sObject (generic SFDC object)
10. enum - typed list of values (numbers: cannot define number values)
.NET strings are references even though they behave like value types
List
Ordered collection of elements that works much the same as a traditional array
Arrays in Apex are synonymous to lists and can be used interchangeably
Declare like:
List<String> myStrings = new List<String>();
Can initialize its values:
List<String> = new List<String>();
myStrings.add('String1');
myStrings.add('String2');
Output of every SOQL is a list
Set
Unordered collection of elements that does not contain duplicates
Commonly used to store ID values because the values are always unique
Can use the set as a part of the WHERE clause in a SOQL query:
Set<ID> accountIds = new Set<ID>{'001d000000BOaHSAA1','001d000000BOaHTAA1'};
List<Account> accounts = [SELECT Name FROM Account WHERE Id IN :accountIds];
(:variable to use the reference passed into the class)
Map
Collection of key-pair values
Each key maps to a single value
Useful when you need to find something quickly by key - key values must be unique
Example:
Map<Id, Account> accountMap = new Map<Id, Account>([SELECT Id, Name FROM Account]);
Id accId = '001d000000BOaHSAA1'; Account account = accountMap.get(accId);
Code Execution
Code executed within an execution context
This context represents the time between when the code is executed and when it ends
The Apex code you write is not the only code that is executing
Invoke Apex
1. Database Trigger
2. Anonymous Apex
3. Asynchronous Apex
4. Web Services
5. Email Services
6. Visualforce or Lightning Pages
Executes in a system context, with access to all objects and fields
Object, field, and sharing rules are not applied for the current user
Database Trigger
Invoked for a specific event on a custom or standard object.
Anonymous Apex
Code snippets executed on the fly in Dev Console & other tools.
Asynchronous Apex
Occurs when executing a future or queueable Apex, running a batch job, or scheduling Apex to run at a specified interval.
Use when:
1. Processing a very large number of records (increases governor and execution limits)
2. Making callouts to external web services
3. Creating a better and faster experience
Web Services
Code that is exposed via SOAP or REST web services.
Email Services
Code that is set up to process inbound email.
Visualforce or Lightning Pages
Visualforce controllers and Lightning components can execute Apex code automatically or when a user initiates an action, such as clicking a button. Lightning components can also be executed by Lightning processes and flows.
Apex Trigger
Execute programming logic before or after events to records in Salesforce
BEFORE
Records saved after the trigger finished execution
1. Before insert
2. Before update
3. Before delete
AFTER
Can access field values set by the system (Id, LastModifiedDate) - records that fire these are read only
4. After insert
5. After update
6. After delete
7. After undelete
Basic syntax:
trigger TriggerName on ObjectName (trigger_events) { // code_block }
ONLY resort to Apex trigger if it cannot be accomplished with a point-and-click tool
Best practice to create one trigger per object
Apex Limitations
Apex triggers can receive up to 200 objects at once
Synchronous limit for total SOQL queries is 100 and 150 for DML statements
Bulkify Code
Create Apex code to handle code to prevent breaching the limitations
Create a list of the specific object you are using DML statement on, and add all the individual records to it - once you have looped through them all, insert/update/delete the list all at once
DML Statement
Data Manipulation Language enables to modify and create records in SFDC
Use if you want to throw error as exception that interrupts control flow (use try..catch to get error)
1. Insert - ID is auto-assigned for new records
2. Update
3. Upsert - creates new records and updates sObject records within a single statement, avoids duplicate creation; compares with ID field if not specify field
upsert jane2 Contact.fields.Email; (matches with email field in upsert)
4. Delete - places records in recycle bin for 15 days
5. Undelete
6. Merge - merges up to 3 records of the same sObject into one of the records and deletes the others
Accepts either a single sObject or a list (array) - list is most efficient
Limit of 150 statements per Apex transaction, which is why you bulkify code and perform one statement on a list
Static Method
Doesn't require an instance of a class in order to run
All static initialization code blocks are executed
Only have access to provided inputs and other static (global) variables
To use Apex controller in Aura Component, must be static
Easier to call because they do not need to be called on an instance of the class but are called directly on the class name
Instance Method
No modified and local variables
Associated with a particular object, have no definition modifier, and created with every object instantiated from the class in which they're declared
Future Methods
Add the @future annotation to your method to make a method asynchronous
Make sure the method is static and returns void type
Not guaranteed to execute in the same order as they are called
Used for:
1. Callouts to external Web Services
2. Operations to run in own thread
3. Isolating DML operations on different sObject types to prevent mixed DML error
Syntax:
global class SomeClass{
@future
public static void someFutureMethod(){}
}
Future Limitations
1. Cannot track execution because no Apex job ID is returned
2. Parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types - cannot take objects as arguments
3. Cannot chain future methods to have one call another
Batchable Interface
Use if you need to process a large number of records
Class implements Database.Batchable interface
Can define start(), execute(), and finish() methods
Invoke with Database.executeBatch method
Stateless, each job is considered a discrete transaction
Batchable Limitations
1. Troubleshooting is troublesome
2. Jobs are queued and subject to server availability
Queueable Apex
Superset of future methods - mixed Batch Apex with Queueable Apex
Can submit jobs for asynchronous processing
1. Non-primitive types - classes can accept parameter variables of non-primitive data types
2. Monitoring - jobId is returned to identify the job and monitor progress
3. Chaining Jobs - can chain jobs to another by starting a second job from a running job
Uses implements Queueable
Debug Log
Where you find most of what you need to debug and analyze your code
Write to the debug log like:
System.debug('My Debug Message');
Each must be 20 MB or smaller
Org can retain 1000 MB of debug logs (oldest are overwritten)
Debug Log Levels
Run from lowest to highest and are cumulative
Finest level = get ALL messages logged as error, warn, info, etc.
1. NONE
2. ERROR
3. WARN
4. INFO
5. DEBUG
6. FINE
7. FINER
8. FINEST
Checkpoints
Reveal a lot of detailed execution information about a line of code, but do not stop execution on that line
Bundle
Has 8 artifacts + metadata, and therefore is stored in a bundle
Represented as a folder of files when you save to local storage
1. Component File (*.cmp)
2. JavaScript Controller (*controller.js)
3. JavaScript Helper (*helper.js)
4. CSS Styles (*.css)
5. Documentation (*.auradoc)
6. Renderer (*renderer.js)
7. SVG File (*.svg)
Server-Side
SFDC server processes the markup and the resulting HTML is sent to the requesting user's browser for display
If a page uses expression "{!variable}, it is evaluated by the server
All framework processing happens on the server
Process:
Client (UI) -> Visualforce -> HTML Rendering -> Client UI (HTML)
1. User requests a page
2. The server executes the page's underlying code and sends the resulting HTML to the browser
3. The browser displays the HTML
4. When the user interacts with the page, return to step one
Aura Components
Component's resources are packaged up and sent to the requesting user's browser
Most is JavaScript
Browser runs JS, which renders the resulting HTML and inserts it into the existing page
Can be composed of dozens or even hundreds of smaller components, which can be composed of even smaller components
Should be the piece of a larger whole - to run, must add it to something larger
Built for one page use
Used in Visualforce pages
Can contain LWC
Client-Side
Expression evaluation, global variables, controller properties resolved here
JavaScript marked here
Process:
Client (UI) -> Aura/Lightning Component -> Component Definition -> Component Bundle -> HTML Rendering -> Client UI (Rendered HTML)
1. The user requests an application or a component
2. The application or component bundle is returned to the client
3. The browser loads the bundle
4. The JavaScript application generates the UI
5. When the user interacts with the page, the JavaScript application modifies the user interface as needed (return to previous step)
Lightning Web Component
Component built directly on the Web stack
Faster than Aura Component to create and does not require the user to download JavaScript and wait for the engine to compile it before rendering
1. Easier to learn than Aura, no Aura framework
2. Better performance
3. Focus on web standards
4. Transferable skills from other web app frameworks (React JS, Angular)
Essential Files:
1. JavaScript - core business logic (needs import statement with LightningElement wrapped and export statement with class name)
2. HTML - structure (includes <template>)
3. CSS - look, feel and animation
Apex Test Class
Use @isTest in the beginning as the tag
Use to create the records and trigger the created Apex trigger on those records
SingIe-Page Applications (SPAs)
Load a single page and a bunch of JavaScript
Once thats loaded, the JavaScript runs and updates the user interface of the page from then on
Users navigate from state to state
Dynamically loads parts of the webpage, instead of loading the entire thing
Initially brings in HTML, CSS, and JavaScript, and after page does not reload nor does it transfer control to another webpage
More seamless transition
Visualforce Page
A web page created using Visualforce.
Typically, Visualforce pages present information relevant to your organization, but they can also modify or capture data.
They can be rendered in several ways, such as a PDF document or an email attachment, and can be associated with a CSS style.
It is a "large" standalone building block
Displayed in
1. Standbard button/link
2. Within standard page layout
3. Tab
4. Salesforce1
Composition
Taking smaller, fine-grained components and assembling them up
Visualforce Component
When built, have more access to features than when develop custom Visualforce components
Less powerful and functional than Aura components
Benefits of Aura Components
1. Aura can fire and receive events to communicate between components - can write handlers or framework with container events
2. The bundle has separate artifacts that auto-wires them together (great organization)
3. Can be used in more contexts
Application Containers
Container is an application context, or environment in which your code runs
Obvious one is Lightning Experience (one.app)
Event must fire within the container for it to be used
Aura component code can access ONLY the services of the container its running inside of even if that container is inside of another container
Can place smaller containers into larger containers, creating multiple layers of the containment hierarchy
1. Salesforce Classic
2. Visualforce
3. Salesforce App
4. Lightning Experience
5. Lightning App Builder (LAB)
6. Lightning console apps
7. Communities
8. Lightning Components for Visualforce (LC4VF)
9. Lightning Out
10. Lightning for Outlook and Lightning for Gmail
11. Stand-alone my.app
Standard Controller
<apex:page contoller="MyController">
Staple feature of Visualforce
Provides the functionality of the page, for example, controls the logic to be executed when a button is clicked
Can bind that page to an sObject type, and get automatic behavior without writing code
Visualforce Controller
Written in Apex, runs server-side
If create with JavaScript remoting and Apex @RemoteAction methods, designed controller code to be highly reusable for Aura components
Aura Component Controller
Written in JavaScript runs client-side, with Apex controller running server-side
Lightning Data Service (LDS)
Only available for Aura components, closest thing for Aura components for Standard Controller
Access data and metadata from Salesforce via Lightning Data Service. Base Lightning components that work with data are built on LDS. Customize your own components to take advantage of LDS caching, change-tracking, performance, and more
Visualforce Action
Controller method that returns a PageReference at the end of it
Usually attached to a button or link, it represents the work the user wants the app to do
Are methods defined on an Apex class
Aura Component Actions
Functions you write in JavaScript and attach to user interface elements
Are function definitions declared on the value side of elements in a JavaScript object in object-literal notation containing name-value pairs
Actions
Are not called, the framework invokes them when appropriate
Apex Properties
Instance variables with custom logic behind them
When defined in Visualforce controller or extension, expressions on a page can use them
Can call helper methods to share or abstract the logic behind them
Component Attributes
Used to access the value in an expression in your component markup
Declared like this:
<aura:attribute name="myAttribute" type="Integer"/>
Require at a minimum a name and datatype
Expando
Set component instance from within an action function
component._myExpando = "A new string variable";
Recommend against these due to memory leaks and subtle bugs, but INSTEAD create component attribute and set its access level to private
Visualforce Methods
Also functions, are declared in controller Apex class in Visualforce pages
Represent tight coupling between parts of the app, hard to reuse because more specific
Aura Component Events
Use loose coupling, like wireless connections
Write component so it behaves whether the event is received and handled or not
Tenant
Group of users/software apps that share hardware through an underlying piece of software
Single Tenant
On a server, does not have another app to share resources with
Advantages:
1. More control over system resources because don't need to share
2. Greater customization
3. Avoiding "noisy neighbor" Syndrome
Disadvantages:
1. No cost sharing between apps
2. Less efficient, server doesn't run at full capacity
Multiple Tenants
On a server, apps/users share access to system resources
Share memory, CPU, network controllers
System responsible for dynamically allocating resources to these apps
Example: Salesforce
Advantages:
1. Shared cost between apps
2. Simplified hosting - hardware managed by Salesforce
Disadvantages:
1. Outage impacts all apps on suite of hardware (mitigated by redundancy by SFDC)
2. Noisy neighbors - other apps may dominate use of system resources (mitigated by Governor limits in SFDC)
Role as a Developer
Does not need to worry about network, OS, Databases, Servers, or any hardware
1. Design data model
2. Implement business logic
3. Test
4. Deploy
Environment
Also called organization
Unique SFDC data and metadata
Instance
Server your org resides on
App
Collection of interrelated functionality
Metadata in your org acting as one unit
Model-View-Controller (MVC)
A fundamental software design pattern that divides the related program logic into three interconnected elements and defines their relationships
Model
Central component of the pattern
Dynamic data structure, and independent of the UI (sObjects)
View
Representation of information
Controller
Converts user input to commands for the model or view
Benefits of MVC
1. Simultaneous development
2. High cohesion
3. Loose coupling among models
4. Ease of modification
5. Multiple views
@AuraEnabled
Tagged to Apex Controller for use in Aura Component
Primitive Data Type
1. Integer
2. Double
3. Long
4. Date
5. Datetime
6. String
7. ID
8. Boolean
sObject
Each record in SFDC is natively represented as this in Apex
For example, Account sObject is abstraction of the account record and holds the account field information in memory as an object
Each record is represented as an sObject before it is inserted into SFDC
Either generic or specific such as Account, Contact, or CustomObject__c
Name and field names correspond to API names of standard or custom objects or fields
Create:
Account acct = new Account (Name = 'Acme')
List Methods
1. list.add(value)
2. list.get(index)
System.debug()
Way to write messages to the debug log
New operator
When creating a SFDC record, allocates it in memory first
Generic sObjects
Can only be created through the newSObject() method
Can only access with put() and get() methods
Can be assigned to any specific sObject (standard or custom)
DmlException
If DML operation fails, this is returned
Helps catch exceptions in code to handle error conditions
try{
// do insert
} catch (DmlException e) {
System.debug('A DML exception has occurred: ' + e.getMessage() );
}
Database Class
Use if you want to allow partial success
Built in and provides methods that perform DML operations that mirror the DML statement counterparts
Optional allOrNone parameter that allows you to specify whether the operation should partially succeed - if false, errors on partial set of records; if true, acts like DML statement counterpart
Database.insert(recordList, false);
Can save results with Database.SaveResult[] results = Database.insert(recordList, false);
Related Records
Use the ID of the record in the lookup and add it when creating the new record
Must be updated in a separate DML operation than an update to the host record
Use any DML statement to carry out the change
SOQL
Salesforce Object Query Language
Query (REST) and query() (SOAP)
Embed SOQL queries in Apex code and get results - inline SOQL
Wrap in [ ] - returns a list (array)
Query Editor
Allows you to inspect the database and view results
SOQL Syntax
SELECT fields from ObjectName [WHERE Condition]
Must specify every field you want explicitly
LIKE Operator
Uses fuzzy matching to retrieve accounts with a specific word as condition
WHERE Name LIKE 'SFDC%'
% is wildcard that matches no other character
ORDER BY Operator
Sort returned record set and specify the field the record set should be sorted
Can be field ascending (ASC) or descending (DESC)
LIMIT Operator
Limits the number of records returned
Variables in SOQL
To use a variable in a SOQL expression, use : before it
Ex: WHERE Department = :targetDepartment
Query Related Records
Add inner query for the child records, which will run against the relationship name rather than the SFDC object name
Example:
SELECT Name, (SELECT LastName FROM Contacts) FROM Account
Can access the related records with
acctsWithContacts[0].Contacts
For parent objects, retrieve info with dot (.) notation
ex: carol.Account.Name
For Loop SOQL
Can include SOQL in for loop, used for efficient chunking with calls to the query and queryMore methods of SOAP API
Helps avoid hitting heap size limit
Example:
for (variable(_list): [soql_query]) { code }
The variable must be the same type as sObjects returned by soql_query
If use the variable_list, enables you to work on batches of records and perform DML operations in batch to help avoid reaching governor limits
SOSL
Salesforce Object Search Language
Search (REST) and search() (SOAP)
Used to perform text searches in records
Can search all objects based on word match, not exact match - searches mostly text fields
Embed queries in Apex - inline SOSL
SOSL Syntax
FIND 'SearchQuery' [IN SearchGroup] [RETURNING ObjectsAndFields]
SearchQuery = text to search for
SearchGroup = scope of fields to search (optional, default all)
1. ALL FIELDS
2. NAME FIELDS
3. EMAIL FIELDS
4. PHONE FIELDS
5. SIDEBAR FIELDS
ObjectsAndFields = information to search and return in the search result (optional, default all)
Text searches are case-insensitive (i.e. matches only letters, not capitalization)
Trigger.New
Contains all the records that were inserted in insert or update triggers
Trigger.Old
Provides the old version of sObjects before they were updated in update triggers, or list of deleted sObjects in delete triggers
Call Class Method from Trigger
Apex_Class.Apex_Method(parameters)
Trigger Exceptions
adError( ) on sObject in question will throw fatal error inside the trigger
Displays error message in the UI
Trigger Callouts
Call out Apex trigger to external Web services
@future(callout=true)
Executes asynchronously
Bulk Apex Trigger
Use a for loop to iterate over all available sObjects
Works if Trigger.New contains one or more sObjects
Execute on batches of 200 records at a time
Parent-to-Child Queries
SELECT Name, (SELECT FirstName, LastName FROM Contacts) FROM Account
Child-to-Parent Queries
SELECT FirstName, LastName, Account.Name FROM Contact
Can traverse up to 5 levels up with dot notation
Aggregate
Returns as AggregateResult type
1. AVG()
2. COUNT([FieldName])
3. COUNT_DISTINCT()
4. MIN()
5. MAX()
6. SUM()
JOIN Operator
Specifies how to relate tables in the query
RIGHT = outer, wants query to return all of the object to the rights (Contact)
SELECT c.FirstName, c.LastName, a.Name FROM Account a
RIGHT JOIN Contact c ON (c.AccountId = a.Id)
LEFT = outer, query to return all objects both inner and outer (any Contacts associated with those Accounts)
SELECT a.Name, c.FirstName, c.LastName
FROM Account a
LEFT JOIN Contact c ON (a.Id = c.AccountId)
*
Matches zero or more characters at the middle or end of the search term
?
Matches only one character at the middle or end of the search term
Indexed Fields
Fields that if used in the WHERE clause, make queries super fast
Makes query selective and index is used instead of full table scan
1. Id
2. Name
3. OwnerId
4. CreatedDate
5. SystemModStamp
6. RecordType
7. Master-Detail Fields
8. Lookup Fields
9. Unique Fields
10. External ID Fields
Query Plan
Displays cost of the query if enabled
Query Best Practices
Avoid
1. Querying for null rows
2. Negative Filter Operators
3. Leading Wildcards
4. Text fields with comparison operators
Search Tokens
Creates tokens for each piece of data, which is stored in the search index with a link to the original record
Allow the system to apply advanced features like spell correction, nicknames, lemmatization, synonyms, relevance ranking (by freq, order, and uniqueness)
Salesforce Federated Search
Can make the global search box an external search engine, that searches the external sources
Uses OpenSearch specification, and does not use Salesforce search index
Way for users to search for items stored outside of Salesforce while in Salesforce
RETURNING
Specifies what data to return in SOSL query
1. ObjectTypeName
2. FieldList
3. ORDER BY
4. LIMIT n
5. OFFSET n
FIND {Cloud Kicks} RETURNING Account (Name, Industry ORDER BY Name LIMIT 10 OFFSET 25)
WITH Statement
Filter records by certain predefined fields
1. DIVISION
2. DATA CATEGORY
3. NETWORK
4. PRICEBOOK
Suggested Records
Returns list of suggested records with names that match the user's search string
Suggested Articles for Cases
Based on description and text fields, suggests articles for cases
Synonym Groups
Create groups of words that are treated as synonyms
Promoted Search Terms
Add to articles to help users find them more easily
Order of Execution
1. Upsert
2. Before Triggers
3. Validation Rules
4. Duplicate Rules
5. Saves Record
6. After Triggers
7. Assignment Rules
8. Auto-Response Rules
9. Workflow Rules
10. Lightning Flow
11. Escalation Rules
12. Entitlement Rules
13. DML Operations
Event-Based Communication
Sender broadcasts a message that one or more receivers capture
Event
A change in state that is meaningful in a business process. For example, placement of a purchase order is a meaningful event, because the order fulfillment center expects to receive a notification before processing an order.
API Name ends in __e as suffix
Event Message
A message that contains data about the event. Also known as an event notification. For example, an event message can be a notification about an order placement containing information about the order.
Event Producer
The publisher of an event message over a channel. For example, an order placement app.
Event Channel
A stream of events on which an event producer sends event messages and event consumers read those messages.
Event Consumer
A subscriber to a channel that receives messages from the channel. For example, an order fulfillment app that is notified of new orders.
PushTopic Events
Clients receive messages about changes in Salesforce records based on a predefined query
Event Bus
Where platform events are stored
Restore events from the event bus with API CometD clients
Can specify replay ID as baseline for the retrieved portion of events or all stored events
Contains methods for publishing platform events
Fields for Platform Events
1. Checkbox
2. Date
3. Date/Time
4. Number
5. Text
6. Text Area (Long)
ReplayId
Refers to the position of the event in the event stream
Not guaranteed to be contiguous for consecutive events
Publish After Commit
Platform event published only after a transaction commits successfully
Define this if subscribers rely on data that the publishing transaction commits or if you do not want the event message to be published if the transaction fails
Publish Immediately
Platform event is published when the publish call executes
Select if you want the event message to be published regardless of whether the transaction succeeds or if publisher and subscribers are independent
Publishing Events
Use EventBus.publish()
Use Database DML operations (Database.SaveResult)
Can also create a record in declarative tool such as process builder and make the record type the platform event you want to publish and se the values
Can also use SFDC APIs
Subscribe to Event
Apex trigger used on the event object to subscribe to incoming events
Trigger runs asynchronously and run under Automated Process system user - must explicitly set the OwnerId field
Only support after insert triggers, which run after platform event is published
Can subscribe with declarative tool by creating a process builder when platform event message is received - select platform event, object, and conditions OR in flow with a pause element
empApi
Methods in Lightning Web or Aura Component to subscribe to events in the app via component
<lightning:empApi aura:id="empApi"/>
CometD
Scalable HTTP-based event routing bus that uses AJAX push technology pattern known as Comet
Implements Bayeux protocol
Used to enable external apps to subscribe to platform events and perform long polling
// Connect to the CometD endpoint
cometd.configure({
url: 'https://<Salesforce_URL>/cometd/48.0/',
requestHeaders: { Authorization: 'OAuth <Session_ID>'}
});
Visualforce Expressions
Any set of literal values, variables, sub-expressions, or operators that can be resolved to a single value
{ ! expression}
Global Variables
Used to access and display system values and resources
{! $GlobalName.fieldName}
1. $Organization
2. $Setup
3. $ObjectType
4. $Action
5. $User
Visualforce Formulas
Supports formulas to manipulate values
Can put the formula as the expression in a Visualforce expression and upon runtime the formula will calculate
Use & to concatenate strings
Fine-Grained Components
Provide more focused functionality
Coarse-Grained Components
Provide significant amount of functionality in a single component
Related Lists
Example: {! Account.contacts} to display related list in table
Visualforce Form
Uses <apex:form> component and <apex:inputField> to create a page and edit data
use <apex:commandButton> with save action to create a new record or save changes to an existing one
Standard List Controller
Use this controller and an iteration component like <apex:pageBlockTable> to display a list of records
recordSetVar attribute set on the same component to iterate through the record collection
Page-Centric
Great for basic functionality, but challenging to deliver more dynamic experience
Relies on the server to generate a new page every time you interact with the application
ISV Partner
Start using Lightning components for new apps or new features in existing apps. Package these units for subscriber use in both Salesforce Classic and Lightning Experience.
Tools include
1. Environment Hub
2. License Management App
3. Checkout Management App
4. Channel Order App
Apps created are available to all customers (Classic and Lightning), get Lightning Experience readiness, and Lightning Ready certification shows it is verified for Lightning Experience
SI
Start using Lightning components for new implementations. For in-progress implementations, continue using Visualforce.
App-Centric
Deliver a more interactive experience
JavaScript used to create, modify, transform, and animate the UI rather than completely replacing it at a time
window.location
In JavaScript, cannot access in Lightning Experience (includes access to window global object)
Salesforce Command Line Interface (CLI)
Provides quick way to run operations for creating and configuring scratch orgs and deploy components
Lightning Locker
Belong to one namespace are secure from components in a different namespace through Security with Lightning Locker.
Lightning Locker also promotes best practices that improve the supportability of your code by only allowing access to supported APIs and eliminating access to nonpublished framework internals.
Lifecycle Hooks
Provides methods that allow you to "hook" your code up to critical events in a component's lifecycle
1. Created
2. Added to the DOM = connectedCallback()
3. Rendered in the brower
4. Encountering errors
5. Removed from the DOM = disconnectedCallback()
this
Keyword in JavaScript refers tot he top level of the current context
Decorators
Used in Javascript to modify the behavior of a property or function
Placed it before the property or function
Example:
@api message;
Single property or function can have only one decorator
@api
Marks a field as public.
Public properties define the API for a component.
An owner component that uses the component in its HTML markup can access the component's public properties.
All public properties are reactive, which means that the framework observes the property for changes.
When the property's value changes, the framework reacts and rerenders the component.
@track
Tells the framework to observe changes to the properties of an object or to the elements of an array.
If a change occurs, the framework rerenders the component.
All fields are reactive.
@wire
Gives you an easy way to get and bind data from a Salesforce org.
Nested Components
Can nest components in each other in the HTML
Tile goes in List, and each tile has data and each data has detail
Use conditional rendering with if:true={product}
<c-tile> is rendering for each tile
c-todo-item
Child component, dispatches an event to the parent c-todo-app component
c-todo-app
Parent component passes a property or invokes a method in the child component
Shadow DOM
Common implementation that allows a component's elements to live in a "sub tree" of the DOM
Apex Hammer
Runs Apex tests on your behalf before each major service upgrade
Runs in the current version and next release and compares the test results
Test Coverage
Need 75% test coverage before Apex can be deployed
Apex can only be written in Dev or Sandbox, and then must be deployed to Production
Test Method Syntax
@isTest static void testName() {
// code_block
}
Test Class Syntax
@isTest
private class MyTestClass {
@isTest static void myTest() {
// code_block
}
}
assertEquals
A method useful in determining Pass or Fail status of a test case
Test Suite
Collection of Apex test classes that you run together
Test Data
SFDC records created in test methods are not committed to database - roll back when test finishes execution
Anonymous Block
Apex code that does not get stored in the metadata, but that can be compiled and executed
Used to quickly evaluate Apex on the fly
Scheduled Apex
Lets you delay execution to run Apex classes at a specified time
Ideal for weekly or daily maintenance tasks
Implement Schedulable interface, and execute with System.schedule
AsyncApexJob
Object to query in order to find queued asynchronous jobs
Apex Flex
Enables you to submit 100 batch jobs for execution
Any jobs that are submitted for execution are in holding status
Jobs processed first-in first-out in the order that they are submitted
When resources available, system picks up the next job from the top of the Apex flex and moves to batch job queue
Does not take @future jobs
CronTrigger
Provides more information about Apex job that has been scheduled
getRecordTypes()
Provides the available record types for a Case for the current user
Elapsed CPU Time
Governor limit that applies to all the code in an Apex transaction
Trace Log
A log that measures data continuously as opposed to measuring data through periodic samples.
Can set up for a specific user
Static Resources
Allows developer to create test records for use in test classes
THIS SET IS OFTEN IN FOLDERS WITH...
Salesforce Certified Platform Developer I - Apex
299 terms
Salesforce Platform Developer 1 Exam
175 terms
Salesforce Platform Developer 1
130 terms
Platform Developer 1 - January 2020
55 terms
YOU MIGHT ALSO LIKE...
ProProfs - Platform Dev 1
35 terms
Salesforce Developer Exam
87 terms
Salesforce Admin Certification
109 terms
Salesforce Platform Developer 1
55 terms
OTHER SETS BY THIS CREATOR
Platform App Builder Certification
154 terms
Admin Certification
215 terms
GRE Vocabulary
701 terms
COMM 187 Final: Case Studies
16 terms