![]() |
面冷心慈的夕阳 · 唐丽杰-动物医学学院· 9 月前 · |
![]() |
痴情的斑马 · 安静(周杰伦演唱歌曲)_百度百科· 10 月前 · |
![]() |
强健的企鹅 · 相比电动车而言,奔驰最新GLC 43 ...· 1 年前 · |
![]() |
叛逆的水煮鱼 · 背上行囊 传递爱心-中央音乐学院党建与思想政治专题网 5 月前 |
![]() |
面冷心慈的夕阳 · 唐丽杰-动物医学学院 9 月前 |
![]() |
痴情的斑马 · 安静(周杰伦演唱歌曲)_百度百科 10 月前 |
You are adding the Contact object instance to Account List , which is Wrong .
For you scenario, the code would be:
Trigger ContactInsertor on Account (after insert) {
List<Contact> conList = new List<Contact>();
if(Trigger.isAfter && Trigger.isInsert){
for(Account a : trigger.new) {
Conatct c = new Contact();
c.LastName='Sharma';
c.Description=a.name;
conList.add(c);
}
insert conList;
}
}
}