Skip to content

Instantly share code, notes, and snippets.

@atulgupta31
Created May 1, 2016 16:47
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 atulgupta31/9907bc70d127cdcdb29702a48f97377d to your computer and use it in GitHub Desktop.
Save atulgupta31/9907bc70d127cdcdb29702a48f97377d to your computer and use it in GitHub Desktop.
// Create a new account as the generic type sObject
sObject s = new Account();
// Verify that the generic sObject is an Account sObject
System.assert(s.getsObjectType() == Account.sObjectType);
// Get the sObject describe result for the Account object
Schema.DescribeSObjectResult dsr = Account.sObjectType.getDescribe();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment