• #24217
    Salesforce | Subodh Subodh #660

    Can we check when the Person Account was enabled in Salesforce Organization? If yes, how?

    Hello Everyone,

    Can we check when the Person Account was enabled in Salesforce Organization? If yes, how?

    Any help would be appreciable.




    Salesforce | Ashley Ashley #395

    Yes, you can check if Person Account is enabled in Salesforce org via Salesforce Apex code. Use this:

    boolean abc = Schema.sObjectType.Account.fields.getMap().containsKey( ‘isPersonAccount’ );

    For more details, visit https://www.forcetalks.com/salesforce-topic/whats-the-best-way-to-check-if-person-accounts-are-enabled-via-apex-code/

    Salesforce | Archit Archit #24

    Hello Subodh,

    Please try with below code might be it would be helpful.

    public class TestPersonAccount {
    public static Boolean personAccountsEnabled()
    sObject testObject = new Account();
    testObject.get( ‘isPersonAccount’ );
    System.debug(‘Account Enabled’);
    return true;
    catch( Exception ex )
    System.debug(‘Account Disable’);
    return false;


    Salesforce | PRANAV PRANAV #681

    Hi Subodh,

    I think you want to know when your org Enables the Person Account. There is not a definite way to check it but you can run the below query to know when the Person Account record type is created.

    Select id,name,createdDate,SobjectType,IsPersonType FROM RecordType WHERE SobjectType=’Account’ AND IsPersonType=True

    As a new family of record types on Account objects is available: “person account” record types when person account is activated.

    Hope this helps you.


Viewing 4 posts - 1 through 4 (of 4 total)

Please to reply to this topic.


We're not around right now. But you can send us an email and we'll get back to you, asap.


About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials


Forgot your details?