+ Start a Discussion
Teach_me_howTeach_me_how 

is it possible to show adderror in future class?

public class preventInvalidCMember_cls {
     @future     
     public static void  preventInvalidCMember(set<id> cmemberIds) {
         List<CampaignMember> cmember_list = new List<CampaignMember>();
         cmember_list = [SELECT id FROM Campaignmember WHERE id IN:cmemberIds];

         for(CampaignMember mycamp : cmember_list){

                 mycamp.adderror('My message');

         }

     }

}

Best Answer chosen by Admin (Salesforce Developers) 
_Prasu__Prasu_
No, that is not. Only thing you can do is send an Email on error.