how to remove a dublicate value form list in apex 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);