+ Start a Discussion
JessBJessB 

Trigger: Way to Find Reason it is firing?

Hi,

I am trying to test the reason a trigger is firing for one account and not others that look similar. My trigger causes an error message to appear at the top of the page that looks exactly like a Validation Rule error. 

For the account with the error, I duplicated the account record, and duplicated the related object records that would cause other triggers to fire, but I am not receiving the error on the duplicated record.

Is there a way to have SF show me why the trigger is firing on the troublesome record?
Ashish_SFDCAshish_SFDC
Hi Jess, 


What is the error that you are gettin?

The best way is to Enable Debug Logs for the user who will be testing and then click the Save button (or which ever equivalent)

Now look for the updated logs - download the one which is related to the performed action and see the flow in the logs - that will certainly give some clue - else paste the log in the Dev Board and Board members can help you isolate or identify the issue. 

See the blog below for more info on debug log. 


Regards,
Ashish
MagulanDuraipandianMagulanDuraipandian
http://www.infallibletechie.com/2012/08/example-for-systemdebug-in-salesforce.html

If this solves your problem, kindly mark it as the best answer.

Regards,
Magulan
http://www.infallibletechie.com