Skip to content

Instantly share code, notes, and snippets.

@suddeb
Created October 3, 2016 00:22
Show Gist options
  • Save suddeb/787decc508aa478a740e5e750818c215 to your computer and use it in GitHub Desktop.
Save suddeb/787decc508aa478a740e5e750818c215 to your computer and use it in GitHub Desktop.
MyCustomObject
MyCustomObject__c newCustomObject = new MyCustomObject__c(myCustomField__c ='My Custome Field');
List<sObject> sObjList = Database.query('SELECT Id FROM MyCustomObject__c WHERE myCustomField__c = :newCustomObject.myCustomField__c');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment