You need to sign in to do that
Don't have an account?
Robert Stathis
Trying to compare a list to another list
I need to compare one list to another but it is not allowing me to do so
public class ContactTriggerHandler { public static void IsPricingLetter(List<Contact> con){ Id CRMUSRecordType = Schema.SObjectType.Contact.getRecordTypeInfosByName().get('CRM Contact US').getRecordTypeId(); //Get a list of all contact ID's that have an active Relationship and of the Pricing Letters type list<accountcontactrelation> PricingLettersCheck = new list<accountcontactrelation>([SELECT id,ContactID,roles From accountContactRelation WHERE contactid in :con AND Roles INCLUDES (:label.messer_us_pricing_letter) AND isactive=true]); List<Contact> ContactLookup = new List<Contact>(); for(Contact ConList :con){ if (ConList.recordtypeid==CRMUSRecordType){ //I NEED TO COMPARE THE PRICINGLETTERS CHECK HERE>> if(conlist.id IN :PricingLettersCheck.contactid){ ContactLookup.add(ConList); } }//end if }//end for loop
Shri Raj