function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDC pvSFDC pv 

I need to find if the duplicate exists in the child object . In parent object i will enter the numbers in csv format . Like 123,456,789 . If 789 already exists in child record i shouldnt' insert the record

Map <List<String>,XXX__c > FFMap = new Map <List<String>,XXX__c> ();
List<Case> Caslist= [SELECT Id,AccountID,Number__c FROM Case  WHERE ID =:CaseId ];
Set<String> xxset = new Set<String>(); 
for (Case cs: Caslist) {
                xxset.add(cs.Number__c);
         }
          List<string> str = new List<string>();
          for (xxx__c xxinfo: [select id,Account__c,Case__c,Number__c from XXX__c where Number__c in :xxset and Case__c = :CaseId ]) { 
              str.add(xxinfo.Number__c);
              xxMap.put(str, xxinfo);
            }
if(Cas.Number__c!=null) {
            for (String num : Cas.Number__c.split(',') )
            {              
                if(num!=''  && !xxMap.containskey(num)) {   // Recieving error here  (Method does not exist or incorrect signature: void containskey(String) from the type Map<List<String>,XXX__c>)
}
}
}