set not removing duplicates apex salesforce code example
Example: apex list remove duplicates
Set<sobject> myset = new Set<sobject>();
List<sobject> result = new List<sobject>();
myset.addAll(originalList);
result.addAll(myset);
Set<sobject> myset = new Set<sobject>();
List<sobject> result = new List<sobject>();
myset.addAll(originalList);
result.addAll(myset);