Apex Programming Review: Study Guide, Study Guides, Projects, Research of Computer Programming

This study guide provides a review of apex programming concepts, including deploying apex code, understanding queueable, batch, and schedulable apex, and debugging apex code. It covers key topics such as apex triggers, global apex classes, interfaces, lightning component integration, wrapper classes, transient keywords, and the order of execution in salesforce. Useful for students and professionals looking to enhance their knowledge of apex programming.

Typology: Study Guides, Projects, Research

2025/2026

Available from 12/30/2025

bestlearner
bestlearner 🇰🇪

1.4K documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
/
5
Apex
Programming Review Study Guide
1.
What
is
required
for
deploying
Apex
code
to
a
Production
instance?:
When
deploying Apex code to production, there are three things which are required:
All
classes
and
triggers
must
successfully
compile.
Tests must cover at least 75% of all Apex code and there must not be any failures.
All triggers must have at least 1% coverage.
2.
What's
the
difference
between
queueable
Apex,
batch
Apex
and
schedulable
Apex?:
Queueable Apex: This is an async process which can be launched to run processing, callouts, etc. This is
useful
when
trying
to
do
processes
in
triggers
which
are
long
running,
or
simply
unavailable,
e.g.
callouts.
Batch Apex: An Apex process which is designed to handle large numbers of records (up to 50 million) by processing
them in smaller batches of 1 - 2000 records at a time.
Scheduled Apex: A process that is scheduled to run at a specific time and date. This can be customized to be repeatable,
either
by scheduling it through the UI, or via a CRON string within other Apex code.
3.
What
are
the
different
events
for
an
Apex
Trigger?:
Triggers are split into two main types:
pf3
pf4
pf5

Partial preview of the text

Download Apex Programming Review: Study Guide and more Study Guides, Projects, Research Computer Programming in PDF only on Docsity!

1 /

  1. What is required for deploying Apex code to a Production instance?: When deploying Apex code to production, there are three things which are required: All classes and triggers must successfully compile. Tests must cover at least 75% of all Apex code and there must not be any failures. All triggers must have at least 1% coverage.
  2. What's the difference between queueable Apex, batch Apex and schedulable Apex?: Queueable Apex: This is an async process which can be launched to run processing, callouts, etc. This is useful when trying to do processes in triggers which are long running, or simply unavailable, e.g. callouts. Batch Apex: An Apex process which is designed to handle large numbers of records (up to 50 million) by processing them in smaller batches of 1 - 2000 records at a time. Scheduled Apex: A process that is scheduled to run at a specific time and date. This can be customized to be repeatable, either by scheduling it through the UI, or via a CRON string within other Apex code.
  3. What are the different events for an Apex Trigger?: Triggers are split into two main types:

2 / before and after. Before triggers run before a record has been saved into the database - optimally used for same record calculations and validations. Whereas, after triggers run after the record has been saved, and should ideally be used for working on records other than the one invoking the trigger. Triggers are then further broken down into the type of operation which invokes it. These are: insert, update, delete, and undelete. This allows the triggers to be customized to only be invoked when explicitly required.

  1. What is a global Apex class?: A global Apex class is an Apex class which has been declared with the global access modifier. This means that the class is visible and usable by any Apex code running in any namespace. Global Apex class should rarely be used and only implemented when explicitly necessary, e.g. within managed packages or for Apex REST web services.
  2. What is an Interface and why would we use one?: An interface is similar to a class, except none of its methods have an implementation. This is useful for abstracting method declaration from its specific implementation. A common example of this can be found with Batch classes, which implement the standard Salesforce interface of Database.Batchable. Using interfaces signifies that a class will explicitly implement the methods defined in it, potentially allowing us to implement ditterent behavior at run time based on context.

4 /

  1. What is transient keyword in Salesforce?: Transient keyword in Apex classes that are serializable, namely in controllers, controller extensions, or classes that implement the Batchable or Schedulable interface. ... Declaring variables as transient reduces view state size.
  2. What is the order of execution?: 1. Executes all before triggers.
  3. Validation rules.
  4. Executes all after triggers.
  5. Executes assignment rules.
  6. Executes auto-response rules.
  7. Executes workflow rules.
  8. If there are workflow field updates, updates the record again.
  9. If the record was updated with workflow field updates, fires before and after triggers one more time. Custom validation rules are not run again.
  10. Executes escalation rules.
  11. If the record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Parent record goes through save procedure.
  12. If the parent record is updated, and a grand-parent record contains a roll-up summary field or is part of a

5 / cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Grand-parent record goes through save procedure.

  1. Executes Criteria Based Sharing evaluation.
  2. Commits all DML operations to the database.
  3. Executes post-commit logic. Ex: Sending email.