Category: TRIGGERS

getobject name by trigger.new

Favorite

Read more

Trigger: Adding Related Records

This trigger adds a related opportunity for each new or updated account if no opportunity is already associated with the account. The trigger first performs a SOQL query to get all child opportunities for the accounts that the trigger fired on. Next, the trigger iterates over the list of sObjects in Trigger.New to get each […]

Read more

How to test for an exception(‘addError’) in a Trigger

I have a trigger, which detects error conditions and feeds errors to the class or field. This gives a nice result interactively, in the GUI. But how do I write test code to catch these errors ? Is there a System.AssertException(), or the equivalent ? The idea is to: a. Write code in the test […]

Read more

How do I control recursive Triggers

Link: Apex Trigger Debugging: Solving the Hard Problems Favorite

Read more

Trigger event

Favorite

Read more

CHEAT SHEATS FOR SALESFORCE/APEX/VFP

CHEAT SHEATS FOR SALESFORCE/APEX/VFP Favorite

Read more