You need to sign in to do that
Don't have an account?

i am getting the following error ': Update failed. First exception on row 0; first error: MISSING_ARGUMENT, Id '
can some one help me out (for the bello w trigger i am facing this problem)
trigger auto_con_led on Account (before insert)
{
//set<id>set1=new set<id>();
//list<account>ac=new list<account>();
list<contact>co=new list<contact>();
if(trigger.isinsert)
{
for(account a:trigger.new)
{if (a.name!=null)
{contact c=new contact();
c.lastname='jansi';
c.accountid=a.id;
co.add(c);
}}
}
update co;
}
All Answers
You are performing an udpate statement on Contact List co. therefore you need to define Id/external id in this update call.
What actually you are trying to accomplish here? are you trying to create new contact for the newly inserted Account. If yes, then change the update statement at the end to insert.
i.e.
insert co;
Cheers!