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
dfcdfc 

Packaging Person Account Logic

As an ISV, say you introduce references to Person Account fields in your Apex code in a managed package.

 

Does this imply that any customer wishing to install your package needs to enable Person Accounts??  If so, what are the best practices or workarounds for this?  Obviously we cannot assume that all potential customers will want to enable Person Accounts in their orgs...

 

Thanks.


Dave

 

Best Answer chosen by Admin (Salesforce Developers) 
A_SmithA_Smith

You can't refer to person account specific fields inside a packageable component.  We don't yet support packaging with person accounts. 

All Answers

A_SmithA_Smith

You can't refer to person account specific fields inside a packageable component.  We don't yet support packaging with person accounts. 

This was selected as the best answer
dfcdfc

Thanks for the quick response, Andrew.

Ron WildRon Wild

In our apps, we focus most of the transaction features around Contacts ... which allows the application to work with regular contacts, or the person-contact side of a person account "bundle" (the account-contact pair wrapped in a person-account record type).

 

Part of the app's functionallity includes auto-creating contacts from inbound payment notifications.  If the customer has person account enabled and wants to create person accounts instead, we offer the ability to create a contact and a special account record (flagged for conversion) that sets the stage for batch or manual conversion to a person account later.

 

Then all you have to do is install the batch person-account conversion code on top of your packaged application to complete the solution.

 

 

 

Anu-SFDCAnu-SFDC

we offer the ability to create a contact and a special account record (flagged for conversion) that sets the stage for batch or manual conversion to a person account later.

 

 

 

 

How do I do it?

JarrettKJarrettK

RE: Andrew Smith, I am building and packaging on the platform.  I have also run into this issue.  Is there any hope for Persons Accounts Fields being enabled for packaging?  I have noticed with packaging we are now able to require "Additional Feature Requirements"  to be selected before a package may be installed.  Would this not allow us to set the pre-requisit for the "Persons Accounts Enabled" org's prior to installation of the package by administrators?  Does Force.com not want to introduce business logic that requires the activation of a feature such as Persons Accounts?

Ales Jenik (Prague, Czech Rep)Ales Jenik (Prague, Czech Rep)

Jarret, did you find a solution or do you still just require the prerequisite "prior enable person account" ?

thanks

Ales 

JarrettKuljisJarrettKuljis

We decided not to require persons accouts in our package at all.  It would't be so bad if it was a requirement for installation of the package, but the managed package cannot reference fields that are persons account fields.  Alternatively we decided to mimic the persons accounts with apex. 

sebascansecosebascanseco
Jarret would you mind sharing how did you mimic PAs with apex? I'm in the same situation here. Thank you!
Cari AvesCari Aves
Just an update on the original question posed in this thread to ensure everyone is aware that Person Accounts have been packageable since the Winter 15 release (Oct 2014).