Trigger not firing on related record

Posted by jsniemi79 on 20-Oct-2014 10:20

I am having trouble getting a trigger to fire on a related record.  I have a credit check object that has a one to one relationship with a contact object.  I have workflow set on the credit check object.  Upon the workflow status field being set to Account Approved, I am trying to run a trigger on the contact object that will create a new record on another object based on the conversion map.  When debugging the trigger, it says it should fire, then says it didn't run, but gives no indication why it won't fire.

Here is my workflow action on the credit check object that says to fire the trigger:

Here is the Run Contact Triggers from the Credit Check Object:

Here is the Create Customer From Prospect trigger on the Contact Object:

Here is the debugging window when I update the status to Account Approved:

Any thoughts on what I could do to make this work would be appreciated.

Thank you in advance.

All Replies

Posted by Gian Torralba on 20-Oct-2014 10:30

Hello,

Can you verify that the code you are using has the "Account Approved" value? I think that you should compare it by "{!status#value}" == "Account Approved". The "not ran" text shows up when a trigger has failed a validation that's why it's didn't work.

Let me know how it goes.

Thank you,
Gian

Posted by jsniemi79 on 20-Oct-2014 10:47

I checked the code with the debugger and it is coming back as true. I ra

I updated the code to use #value and tried again. I get the same end result.

Posted by Gian Torralba on 20-Oct-2014 10:57

Hello,

Can you verify that there is a related contact record when creating the credit check record? I think it is not passing thru the run related trigger.

Thank you,

Gian

Posted by Rajkumar Mateti on 20-Oct-2014 11:01

Hi jsniemi79,

Can you please try once with Checking the check box "Run dependent triggers after this one is completed".

Please let us know the feedback?

Thanks,

Rajkumar

Posted by jsniemi79 on 20-Oct-2014 11:03

Gian,

That was it.  Thank you very much.  It is working now.

This thread is closed