You need to sign in to do that
Don't have an account?
rushi ettam 7
upsert Account records
Compile Error: Invalid type: Databse.UpsertReuslt at line 10 column 5
I got the above error when trying to use the upsert using database class.Plz anybody have solution for this?
public class upsertAccount{
public static List<Database.upsertResult> upsertAcc(){
List<Account> acclist = [select id,name,Billingcity from Account where Billingcity = ' ' ];
for(Account acc :acclist ){
acc.Billingcity = 'atlanta';
}
Account newAcc = new Account(name='Acme',Billingcity= 'San Fransicso');
acclist.add(newAcc);
//upsert(accList);
Databse.UpsertReuslt[] result = Database.Upsert(acclist ,false );
}
}
Thanks in advnace....
I got the above error when trying to use the upsert using database class.Plz anybody have solution for this?
public class upsertAccount{
public static List<Database.upsertResult> upsertAcc(){
List<Account> acclist = [select id,name,Billingcity from Account where Billingcity = ' ' ];
for(Account acc :acclist ){
acc.Billingcity = 'atlanta';
}
Account newAcc = new Account(name='Acme',Billingcity= 'San Fransicso');
acclist.add(newAcc);
//upsert(accList);
Databse.UpsertReuslt[] result = Database.Upsert(acclist ,false );
}
}
Thanks in advnace....
James Loghry
You have a typo at line 10. It should be Database instead of "Databse".
rushi ettam 7
I tried the "Database" but still getting the same error
James Loghry
You also have a typo with Database.UpsertRetsult on that same line. Try replacing line 10 with the following: