You need to sign in to do that
Don't have an account?

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');
}
}
}
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');
}
}
}