You need to sign in to do that
Don't have an account?
mahi
error:::maximum trigger depth exceeded
hi All,
i am getting 'maximum trigger depth exceeded' error while inserting new account through trigger.
i am using developer account.
cud anybody help me out?
thanks,
Mahi
gokubi
Post your trigger code...
mahi
hi
this is trigger code::
trigger test_createacc on Account (before insert) {
//account[] a=trigger.new;
//myCreateAcc.mycreateacc();
account aa= new account(name='xxx', sla__c='gold', SLAExpirationDate__c=system.today(),Active__c='yes',SLASerialNumber__c='11');
insert aa;
}
gokubi
Your Account trigger is creating a new Account, which is firing the Account trigger again. You're essentially in an infinite loop, and Apex kicks you out. I'm not sure what you're trying to do with your code, but if you have a trigger that is modifying the same object that you're triggering on, you have to be careful not to get into these kinds of loops.
mahi
thanks a lot :)
actually i m new to apex..so playing with it.