Skip to Main Content
Learning Force.com Application Development
book

Learning Force.com Application Development

by Chamil Madusanka
April 2015
Beginner content levelBeginner
406 pages
8h 50m
English
Packt Publishing
Content preview from Learning Force.com Application Development

Triggers

As you learned in the previous section, Apex code can be used to write classes or triggers. A trigger is an Apex script that executes when a data manipulation language (DML) event occurs on a specific sObject. Therefore, triggers are directly bound with the records of a particular sObject. If the particular record is affected, then the related trigger will be executed:

  • The record is accessed via the standard page or Visualforce page
  • The record is accessed via a web services API

Triggers can be created on any custom or top-level standard object. There are four types of DML events that affect a trigger of a particular object:

  1. Insert
  2. Update
  3. Delete
  4. Undelete

The preceding DML events can be executed either before or after the event. You can specify ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Application Development with Force.com

Mastering Application Development with Force.com

Kevin J. Poorman
The Developer’s Guide to the Force.com Platform

The Developer’s Guide to the Force.com Platform

Rick Greenwald, Glen Martin, Andrew Fawcett, Phil Choi

Publisher Resources

ISBN: 9781782172796Supplemental Content