CLASS
public with sharing class AccountUpdate {
public static void doAfterUpdate(List<Account> newRecs){
Account_Source_Value__c other = Account_Source_Value__c.getValues('Other');
Account_Source_Value__c partnerReferral = Account_Source_Value__c.getValues('Partner Referral');
Account_Source_Value__c phoneInquiry = Account_Source_Value__c.getValues('Phone Inquiry');
Account_Source_Value__c purchasedList = Account_Source_Value__c.getValues('Purchased List');
Account_Source_Value__c web = Account_Source_Value__c.getValues('Web');
Set<Account> acctIds = new Set<Account>(newRecs);
//unordered list of acctIds =(newRecs)
List<Contact> cntctRecs = new List<Contact>([SELECT Id,Account.Name,Account.BillingCity,Account.BillingPostalCode,NewField__c
FROM Contact
WHERE (Account.Id IN:acctIds)]);
// select list of contact sequence of element's
for(Contact cntctRec:cntctRecs){
if( match the value of account source to my custom settings)
{
cntctRec.NewField__c = ' the value of the match'
}
}
update cntctRecs;
}
}
I have a problem i dont know how to match the account source to my custom settings. can someone please help me with the codes?