Skip to content

Instantly share code, notes, and snippets.

@lfreeland
Created April 22, 2016 02:46
Show Gist options
  • Save lfreeland/73dfb7c3a148b9d76d7b4096664b6f0d to your computer and use it in GitHub Desktop.
Save lfreeland/73dfb7c3a148b9d76d7b4096664b6f0d to your computer and use it in GitHub Desktop.
String format = 'Select Id from Account where Id = {0}';
String Id = '<some_id>';
String query = String.format(format, new List<String>{ Id });
system.debug(' query is ' + query);
// Output: query is Select Id from Account where Id = <some_id>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment