Created
February 26, 2015 17:14
-
-
Save karanrajs/91fb2fad2d8d1de50cfb to your computer and use it in GitHub Desktop.
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
// Check to see if person accounts are enabled. | |
public Boolean personAccountsEnabled() | |
{ | |
// Describe the Account object to get a map of all fields | |
// then check to see if the map contains the field 'isPersonAccount' | |
return Schema.sObjectType.Account.fields.getMap().containsKey( 'isPersonAccount' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment