function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFGSFG 

Way to query the logged in users organization to find out of they have "person accounts" enabled?

I am trying to add code branches that run different based on orgs with/without person accounts enabled.

 

Thanks!

hisrinuhisrinu

I think you can do one thing, if you enable personal accounts there is a field called isPersonAccount. Using this field you can determine the personal accounts are enabled or not

 

In order to retrieve this field you can use a describe call and check it out whether you have this field or not.

 

There might be a better way than this............ but I am not really sure :)