• Maniraj Roy
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi all,

I have 3 list of account IDs (for 1 sObject is account, for other 2 they are child of account object).

 @AuraEnabled public static List<Account_Reg__c> accNameRegList{get;set;}
 @AuraEnabled public static List<Account_Name__c> accNameList{get;set;}
 @AuraEnabled public static List<Account> accList{get;set;}

I want to compare 3 list of IDs and the get the intersection of those 3 list.
But any of them can come empty also.
  • If 1st & 2nd list is not empty, take intersect of themand return the IDs
  • If 1st, 2nd & 3rd list is not empty take intersect of them and return the IDs
  • If  only one list is not empty , return that list of IDs.
Can you please help me out on this ?
Thanks in advance.