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
sf sharathsf sharath 

please resolve the error help me

Error: Compile Error: unexpected token: ':' at line 3 column 20

 

 

 

trigger employeetrigger on employeec__c (before insert,before update)
{
for(employeec__c : trigger.new)
{
if(country__c == null)
{
country__c='India';
}
}
}

prady-cmprady-cm

It has to be

 

for(employeec__c e : trigger.new)

 and you can reference fields of employee__c by using

 e.country__c= whatever

sf sharathsf sharath

thankyou somuch