Skip to content

Instantly share code, notes, and snippets.

@capeterson
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capeterson/620a29b9e1474d9909b8 to your computer and use it in GitHub Desktop.
Save capeterson/620a29b9e1474d9909b8 to your computer and use it in GitHub Desktop.
Id someId = [SELECT id FROM Contact LIMIT 1].Id;
String ruinedCase = ((String)someId).toLowerCase();
Id fixedCase = Id.valueOf(ruinedCase);
System.assertEquals(
String.valueOf(someId).subString(0,15),
String.valueOf(fixedCase).substring(0,15)
); //fails, for me: System.AssertException: Assertion Failed: Expected: 003i000002O2aZG, Actual: 003i000002o2azg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment