+ Start a Discussion
rushi ettam 7rushi 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');
    Databse.UpsertReuslt[] result = Database.Upsert(acclist ,false );

Thanks in advnace....
James LoghryJames Loghry
You have a typo at line 10.  It should be Database instead of "Databse".
rushi ettam 7rushi ettam 7
I tried the "Database" but still getting the same error
James LoghryJames Loghry
You also have a typo with Database.UpsertRetsult on that same line.  Try replacing line 10 with the following:
Database.UpsertResult[] result = Database.Upsert(acclist ,false );