I have written the below trigger for inserting the new account. There is no error but when i checked the accounts tab, new record was not there(My trigger is in active stage).
My doubt is, when this trigger will run and the new record will get added?
And also please let me know where i went wrong
My code:
trigger createNewAcc on Account (After insert) {
Account acc =new Account();
acc.Name = 'AccountCreatedThruTrigger';
acc.Industry = 'Education';
insert acc ;
}
Note: I have written this in the Setup--> Accounts-->Triggers