You need to sign in to do that
Don't have an account?
alexj
test trigger after insert Lead and Account
Is it possible to call two trigger on a test ?
My problem is that I must insert account to test my trigger after insert Lead and I have too a trigger after insert account.
When I test my class, the first trigger is tested but not the second and my code isn't correctly covered.
How can I not run trigger for the insert of account which is just initialization and run the trigger for the insert of lead ?
Hi,
Your trigger will be called whenever you have performing any DML operation on that Object record inside the Test Method. So since you are inserting account your trigger on Account Object is called first. Now if you are inserting the Lead object record inside the test method and you trigger having insert condition on Lead Object then your Lead trigger must be called.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Indeed when i execute my test class, the trigger for the account when i insert account but the trigger for the lead don't.
up please
Anybody knows why my trigger don't run when I call it a second time ?