+ Start a Discussion

Package Deployment: Missing Organization Feature: B2C

We are trying to deploy an un-managed package from one Dev org to another. The source has Person account enabled and target does not have Person account. We are not using any feature provided by Person account or standard Account. All the objects, pages, controllers in this package are custom developed. What is the best way to deploy this package in target organization?
Sumit Kumar Singh 9Sumit Kumar Singh 9
Hello SRNair, 

You have 2 options - 
1) Either ask salesforce support to enable Person account in the target Org. 
2) OR you will have to modify you code -
You should check first whether the Person Account is enabled OR not ?
You can write a utitly method like this - 
public static boolean isPersonAccountEnabled() {
      return Schema.sObjectType.Account.fields.getMap().containsKey( 'isPersonAccount' );      
It will return true if person account is enable otherwise false. 

Sumit Kumar Singh
Hi Sumit,

Thanks for your reply. I do not want to enable Person account in target org. I am not sure how the second option will help my packaging and deployment. Could you please explain a little bit more?
Sumit Kumar Singh 9Sumit Kumar Singh 9
Hello SRNair,

You might be using "isPersonAccount" field in your code somewhere.

Before performing any CRUD operation , pls check that wthether "Person Account" is enabled for that organization or  not? If not, throw an error message. 
To check whether personaccount is enabled or not, you can use the above utility function. 

Sumit Kuamar Singh

James GriffinJames Griffin


I'm having this issue as well. Althought our source org has Person Accounts enabled, there are no references to it in our Apex/VisualForce. Is there a way for us to install the package in orgs without Person Accounts enabled?