+ Start a Discussion
chanti kchanti k 

How to avoid Error: Compile Error: line 6:5 no viable alternative at character '' at line 6 and 7th linecolumn 5

HI,
trigger insertMember2 on Member__c (after insert) {
 Set<Id> Ids= new Set<Id>();
    for (Member__c member : Trigger.new)
    {
        Ids.add(member.Id);        
    }
 List<Member__c> memberList = new List<Member__c>([Select Id,FirstName__c,LastName__c  From Member__c e where Id in :Ids]);

    for(Member__c temp : memberList )
    {
        Member2__c member2 = new Member2();
        member2.FirstName__c = temp.FirstName__c;
        member2.LastName__c = temp.LastName__c;
        insert member2;

    }


 }
Regards,Chanti
 
David Zhu 8David Zhu 8
why there is a "e" betwee member__c and where?
Would this work?
List<Member__c> memberList = [Select Id,FirstName__c,LastName__c  FromMember__c where Id in :Ids];