function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Class slaesforceClass slaesforce 

error colon line 20, column 1

trigger EmployeInfrmationTrigger on Employe_Infrmation__c (before insert, before update) {
    
    set<string> nam = new set<string>();
    
        for(Employe_Infrmation__c somt:trigger.new){
        
            
    nam.add(somt.Name);
}

    set<string> ch =new set<string>(); 
    
for(Employe_Infrmation__c gh:[select id,Name from Employe_Infrmation__c where Name in id:nam]){

    ch.add(gh.Name);
}

    for(Employe_Infrmation__c somt:trigger.new){
     
     if(somt.Name!=trigger.oldMap.get(somt.id).Name){
            
    if(ch.contains(somt.id))
    
    somt.adderror('kkkk');
    
    }
    }
    }