Developer Fundamentals
Developer Fundamentals
1
● Lightning Record pages
○ Object-specific actions are only supported on lightning record pages.
● Developing in Salesforcemulti-tenant environment
○ Polyglot persistence
○ The platform monitors queries and DML operations and throws a runtime
exception if they exceed governor limits.
■ This means: queries should be selective in terms of the number of
records returned.
● Execution Governors and Limits
○ Runtime engine enforces limits
■ How long a SOQL query can run
■ How many records can be returned in a query
■ The maximum amount of CPU time a transaction can take
■ Limits on the total number of DML statements that can be executed in
an apex transaction.
● Component Bundles
○ A component bundle contains a component or an app and all its related
resources.
2
○ Functions added in a helper file can be called from any JavaScript code in the
Lightning component bundle
■ Init
■ Render
■ afterRender
● Domain
○ LWC
■ My domain must be configured and deployed to the org in order to
use custom Lightning components.
3
● can only be handled by components in the firing components
containment hierarchy
4
■ isAccessible() method
● can be used to determine if the current user has read access to
a specific field
■ getDigits() method
● returns the maximum number of digits specified for the field.
● Only valid with integer fields
■ isFormulaTreatNullNumberAsZero()
● Returns true if null is treated as zero in a formula field
○ DescribeSObjectResultClass
■ Contains methods for describing SObjects.
■ getSObjectType()
● Returns the SObjectType object for the sObject
■ getRecordTypeInfosById()
● Returns a map of the record Ids and details of their associated
record types
● Result Data Type is:Map<Id, Schema.RecordTypeInfo>
■ getRecordTypeInfosByDeveloperName()
● Return a map that matches developer names to their
associated record type
■ getRecordTypeInfosByName()
● Return a map that matches record labels to their associated
record type
■ getLabel()
● Returns the objects label, which may or may not match the
object the object name
■ Determine types of permission on the current object
● isDeletable()
● isAccessible()
● isCreateable()
5
● isSearchable()
○ SchemaClass
■ Contains methods for obtaining schema describe information
■ describeTabs()
● Returns information about the standard and custom apps
available to the running user.
● The result can be stored in a list of
Schema.DescribeTabSetResult.
■ getPicklistValues()
● the getPicklist Values method is used to retrieve the picklist
values.
● A Schema.PicklistEntry object is returned from the field
describe result using the getPicklistValues method
6
○ Compound fields are accessible only through SOAP API, REST API, and Apex.
The compound versions of fields aren’t accessible anywhere in the Salesforce
user interface.
○ Although compound fields can be queried with the Location and Address
Apex classes, they’re editable only as components of the actual field. Read
and set geolocation field components by appending “__latitude__s” or
“__longitude__s” to the field name, instead of the usual “__c.”
○ Geolocation and Address
● External Object Relationships
● RecordTypeInfoclass
○ getDeveloperName()
○ getName()
○ Flow, process, apex trigger can be used to subscribe to the plat event
■ When an event message is received, it can send an email to the users
and create a record of a custom object automatically
○ Lookup and master-detail relationships are not available on the User object
7
● Possible by using a hierarchical relationship
○ Master-detail
● Detail records will inherit the security and sharing settings of
the master
● The child record inherits the record owner of the parent record
○ Many-to-Many
8
○ Lookup
■ Roll-up summary fields can only be added to the parent object in a
master-detail relationship
● The parent object field and the child object field are specified
to match and associate records in the relationship
○ Hierarchical
9
○ External Id field can be used to associate records instead of the usual record
Id
■ The child object must have an existing relationship field to the parent
object such as
■ File field type cannot be converted into other data types
■ Option to change the data type of a custom field is not available for all
data types
■ Data type of fields that are referenced by the Apex class/Visualforce
page cannot be changed easily
10
● Field update
● Flow
● Jobs
● Formula
Given a scenario, identify common use case and best practices for
declarative vs programmatic customizations, including governor limits,
formula fields, and roll-up summaries
11
● NOW or TODAY
○ Roll-up summary field can be created on any object on the master side of a
master-detail relationship
■ Caserecords are related to Accounts and Contactsvia lookup
relationships
● Thye can not be used in roll-up summary fields on those 2
objects.
○ Formulas:
■ COUNT
● Totals the number of related records.
■ SUM
● Totals the values in the field you select in the Field to
Aggregate option. Only number, currency, and percent fields
are available.
■ MIN
● Displays the lowest value of the field you select in the Field to
Aggregate option for all directly related records. Only number,
currency, percent, date, and date/time fields are available.
■ MAX
● Displays the highest value of the field you select in the Field to
Aggregate option for all directly related records. Only number,
currency, percent, date, and date/time fields are available.
● Dynamic forms
○ Can be enabled on a lightning record page
12
■ Fields from the current record as well as fields from parent objects
can be added to the page.
■
● Formula function
○ CURRENCYRATEformula function can be used in a formulafield to return the
conversion rate to the corporate currency for the given currency ISO code.
● Formula fields
○ Can return an image by using the IMAGE function
○ Return a link with the session Id as a parameter by using the HYPERLINK and
GERSESSIONID function
○ Limitations:
■ DO NOT support Long/Rich/Encrypted Text Area fields
■ Not available in
● Connect Offline
● Web-to-Lead forms
● Web-to-Case forms
● Cross-object formula
○ Reference field values from related parent records
○ Even though a user does not have access to a record, data from this record
can still be visible to the user through cross-object formula fields.
○ Formula fields can reference field values from related parent objects that are
up to 10 relationships away
○ Formula fields can not reference values from child records.
13
Given a scenario, identify the options and considerations when
importing and exporting data into development environments.
○ Types:
■ Basic Data Import
● A guided process for importing contacts and leads using CSV
file and a simple data-mapping interface
■ Data Inport Wizard
● Large or complex import job / to import data for other objects
● Up to 50,000 records at a time
● ‘One-time’
■ Data Loader
● Large or complex import job / to import data for other objects
● More then 50,000 records
○ Difference:
■ Data Loader can load higher data volumes than the Data Import
Wizard, While both tool support custom objects, he Data Import
Wizard does not support all standard objects, unlike Data Loader.
Mapping cannot be saved using the Data Import Wizard, which makes
Data Load suitable for loading data multiple times.
■ Data Import Wizard provides an option to prevent workflow rules and
processes(as well as record-triggered flows) from firing when records
are created or updated. The data storage capacity has no impact on
deciding which data import tool is used.
●
Describe the use cases and best practices for Lightning Web Component
events
14
● Events Fired During the Rendering Lifecycle
○ The firing of init() events starts from the innermost component and then
traverses outwards the components higher in the hierarchy.
15