You need to sign in to do that
Don't have an account?
ips
Trigger on junction object not get fired
Hi,
I have one junction object 'C' with 'A' and 'B' as parents.
I have written a trigger on 'C' junction object for after delete event. When I delete a junction object,it gets called properly.
But, when I delete a parent object 'B', it deletes a junction object with it, but not fired the trigger written on junction object.
Can any one tell me why this is happening?
Thanks in advance....
Hi,
Your juction object has master-detail relationship with object --> A and B . Also you have mentioned you have written a trigger on the object C - your junction object.
In salesforce when a parent is deleted in a master-detail relationship the children are silently deleted and donot fire the triggers written on them, this is as per salesforce design, hence the fact that your trigger not getting fired is normal.
This happens as this how salesforce has designed the master-detail relationship to work.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
Hi,
Your juction object has master-detail relationship with object --> A and B . Also you have mentioned you have written a trigger on the object C - your junction object.
In salesforce when a parent is deleted in a master-detail relationship the children are silently deleted and donot fire the triggers written on them, this is as per salesforce design, hence the fact that your trigger not getting fired is normal.
This happens as this how salesforce has designed the master-detail relationship to work.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hi,
Thanks for reply.
Is there any workaround available for this trigger to fire?