Created
June 29, 2018 19:40
-
-
Save lfreeland/02c13d10ebd5873e76209891833d4c4c to your computer and use it in GitHub Desktop.
List<Id>.Contains Salesforce Bug Apex Script Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Id firstId = 'a0a5B000002XgIoQAK'; | |
| List<Id> ids = new List<Id>{ firstId }; | |
| Id sameId = 'a0a5B000002XgIoQAK'; | |
| // false... wtf? | |
| system.debug(' list of ids contains same id? ' + ids.contains(sameId)); | |
| Set<Id> setOfIds = new Set<Id>{ firstId }; | |
| // true | |
| system.debug(' set of ids contains same id? ' + setOfIds.contains(sameId)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment