You need to sign in to do that
Don't have an account?
ajay ambati
updating multiple records from child to parent in anonymous window hlp me plssss
iam executing this code in anonymous block iam getting error like my requirment is only in anonumos window
Line: 35, Column: 1
System.ListException: Duplicate id in list: 00128000003LLRkAAO
OK
pls hlp me
:*the following below is my code:*
list<account> lst1 = new list<account>();
list<schema.contact> lst = [select id,name,account.name,account.Fax from contact where account.Fax != null];
for(schema.contact c:lst)
{
system.debug('DISPLAY'+c.account.name);
system.debug('@@@@@@'+c.account.Fax);
//Account ac = [select id,name,fax from account where id=:c.account.id];
c.account.Fax='040-567-234';
lst1.add(c.account);
}
update lst1;
Line: 35, Column: 1
System.ListException: Duplicate id in list: 00128000003LLRkAAO
OK
pls hlp me
:*the following below is my code:*
list<account> lst1 = new list<account>();
list<schema.contact> lst = [select id,name,account.name,account.Fax from contact where account.Fax != null];
for(schema.contact c:lst)
{
system.debug('DISPLAY'+c.account.name);
system.debug('@@@@@@'+c.account.Fax);
//Account ac = [select id,name,fax from account where id=:c.account.id];
c.account.Fax='040-567-234';
lst1.add(c.account);
}
update lst1;
All Answers
------------
Thanks,
Srinivas
- Please mark as solution if your problem is resolved.
Line: 36, Column: 1
System.ListException: Duplicate id in list: 00128000003LLRkAAO
Line: 51, Column: 3
Incompatible element type Schema.SObjectField for collection of Id
Line: 51, Column: 16
Variable does not exist: accountid