Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
trigger newContact on Account (after insert) { account a=trigger.new[0]; list<contact> lt=new list<contact>(); contact c=new contact(); c.lastname=a.name+'_contact'; c.AccountId=a.Id; lt.add(coffee); } insert lt; }
http://amitsalesforce.blogspot.in/2015/06/trigger-best-practices-sample-trigger.html
Please let us know if this will help you.
Thanks
Amit Chaudhary
Let me know if this helps.