Hi i have written the trigger and apex class as below but this does not update the existing records in Account object, I am trying to update the website for the Account Amazon
trigger AccountTrigger on Account (After Insert) {
if(Trigger.isAfter==true && Trigger.isInsert==true){
updateAmazon.check();
}
}
public class updateAmazon{
public static void Check(){
List<Account> Listrecord=new List<Account>();
Listrecord=[SELECT name,website from account where name='Amazon'];
List<Account> UpdateList=new List<Account>();
for(Account acc:Listrecord){
acc.website='www.amazon.com';
UpdateList.add(acc);
}
update UpdateList;
}
}
Please help, unless i create a new record the existing records do not get updated.
Thanks