Join Duard Lynn Davis for an in-depth discussion in this video Not best practice, but very common, part of Learning Salesforce.com Development.
- We just finished looking at the best practices…when writing trigger and trigger handlers.…So let's look at the best things not to do…in your trigger and trigger handlers.…In this example I'm showing here.…This is an actual, real life coding example…and I've removed over five pages worth…of code from this trigger.…So, just in the trigger itself,…it's over five pages long, its got a lot of stuff in there.…I've boiled it down to just a few key things…I wanted to point out…and why this makes it difficult,…even though it may work,…to maintain long-term and to debug when it doesn't work.…
So let's look at some of the challenges we're having.…One challenge is, not all trigger types are handled.…Notice that we're only handling four of the seven.…So we're handling after insert, after update,…before insert and before update.…What happens on before delete or after undelete…or after delete?…Are those handled? Do we not care?…The thing of it is, if you're trying to debug an issue,…you don't know.…And so, if you didn't write the code,…
AuthorDuard Lynn Davis
- How Apex works
- Bulkification and triggers
- Systematically debugging your code
- Sets, lists, and maps
- Trigger and trigger handlers
- Batch Apex
- Debugging and logging
Skill Level Intermediate
1. Introduction to Environment
2. Sets, Lists, and Maps
3. Trigger and Trigger Handlers
4. Batch Apex
5. Debugging and Logging
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.