I have the below line that compares 2 text fields on a custom object to see if they contain specific values:
if(Object.Notes__c != null && (Object.Notes__c.contains('Value1') ||
Object.Notes__c.contains('Value2')))
However, now I want to change the statement to see if the text entered in the Notes__c field on my custom object contains any of the values set in CustomSetting1. How would i go about that?
I've tried the following, but I'm not sure if this is right or will give me all the values in my custom setting:
List<Keywords__c> custSet = Keywords__c.Getall().Values();
string keyWords=custSet[0].Name;
for(Object__c Object : Trigger.New){
if(Object.Notes__c != null && Object.Notes__c.contains(keyWords))...