Created
March 28, 2016 12:35
-
-
Save lfreeland/9093ef1523efbfda9af8 to your computer and use it in GitHub Desktop.
Valid Dynamic SOQL Function and SObject Reference Examples
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
| // Valid Dynamic SOQL from function | |
| Set<Id> accountIds = getAccountids(); | |
| String accountQuery = ‘Select id, name from Account where Id in :accountIds’; | |
| // Valid Dynamic SOQL from SObject | |
| Account acct = new Account(Id = ‘Some_Acct_Id_Here’); | |
| Id accountId = acct.Id; | |
| String accountQuery = ‘Select id, name from Account where Id = :accountId’; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment