Do Field Update using Apex Trigger #inSalesforce

Do Field Update using Apex Trigger #inSalesforce


trigger AccountTrigger on Account(before insert, before update){  
    for(Account a: Trigger.new)   {       
        if(a.AnnualRevenue > 1000000){       
            a.sampleField__c = 'VIP';     
        }            
    }   
}

Comments