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!

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?

  • 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 '13 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. – ca_peterson Oct 25 '13 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 '13 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.