O'Reilly logo

Mastering Application Development with Force.com by Kevin J. Poorman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Safety in numbers

Now we have a basic trigger under our belt. Let's look at what might happen if we fire that trigger with one record. If this trigger fires with a single contact record, it will update every case related to that contact whenever the contact's phone number is changed. However, triggers rarely run with only one record, and because of this, our example trigger has a number of flaws. If the trigger executes with two records, this trigger will only modify those cases where the contact ID matches the first contact record. However, the Salesforce1 platform does not guarantee that our triggers will fire with a single record. In fact, with this platform, it is quite clear that triggers will execute with at least 1 but no more than 200 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required