6

We have an AppExchange package that would ideally create a different set of custom fields for each customer, depending on configurations that either the customer sets at package installation time or else where in our own system. For example, let's say each feature requires a custom field; one customer might only need features A and B, while another might only need features B and C, and if we have hundreds of these features for our customers to choose from, we wouldn't want to create hundreds of these custom fields if they're only going to select a handful.

Is this possible? Thanks!

1 Answer 1

6

No, you can't dynamically create schema with a package. You would need to either include all fields and "feature" them selectively in different configurations or have different packages.

EDIT: Have you considered a package with a base schema, that is needed in all configurations? Then you have a series of other packages which extend your base package and has additional schema?

3
  • 2
    Creating a base package, adding extensions, then using some dynamic apex code to dynamically reference fields, objects, and classes, definitely a great idea.
    – sfdcfox
    Oct 25, 2013 at 18:51
  • @sfdcfox although not for the faint of heart. There's a significant amount of complexity and post-install work added by doing this. But I agree it's the best option. Oct 25, 2013 at 23:38
  • I would suggest using yous base managed package for all, and then offer a custom designed unmanaged package for each different customer, with their specific custom fields.
    – altius_rup
    Oct 26, 2013 at 10:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .