You need to sign in to do that
Don't have an account?
Anil Savaliya
Trigger is not Firing
Hey,
I have contact Followed Object ,and It has master detail retailionship with contact and look up with user.
When I am deleteing contact ,it's delete contact follow by.it's natural and expected.But when I see debug log there is DML opetion happening for Delete Contact ,But I can't see DML opertion for Delete Contact Follow,But it's deleting contact follow by.Becuase of absent of DML opertion in contact follow,My trigger is not firring for contact follow by ?
This behaviour is natural or weired ?
I have contact Followed Object ,and It has master detail retailionship with contact and look up with user.
When I am deleteing contact ,it's delete contact follow by.it's natural and expected.But when I see debug log there is DML opetion happening for Delete Contact ,But I can't see DML opertion for Delete Contact Follow,But it's deleting contact follow by.Becuase of absent of DML opertion in contact follow,My trigger is not firring for contact follow by ?
This behaviour is natural or weired ?
When deleting a master in a master-detail relationship, the delete action of the detail records is considered a 'cascade' delete. Cascading delete operations do not fire triggers.
For example: If you delete your Contact object, the Contact Followed object's delete trigger will not fire. If you delete your Contact Followed object, its delete trigger WILL fire.
Here is some documentation to help you understand why this is expected functionaliy: http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_triggers_ignoring_operations.htm
Please mark this as a solution if it helped you, Anil!
All Answers
When deleting a master in a master-detail relationship, the delete action of the detail records is considered a 'cascade' delete. Cascading delete operations do not fire triggers.
For example: If you delete your Contact object, the Contact Followed object's delete trigger will not fire. If you delete your Contact Followed object, its delete trigger WILL fire.
Here is some documentation to help you understand why this is expected functionaliy: http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_triggers_ignoring_operations.htm
Please mark this as a solution if it helped you, Anil!