0

I am deploying a Managed Package with a few APEX Triggers in it. Each organization that installs the Managed Package should be able to determine which Triggers run so I need a way to provide a "Setting" to Enable/Disable each Trigger from running.

Would it be best to do this with a Custom Setting or the New Custom Metadata Type? Could anyone give me some examples on this?

1 Answer 1

1

I would recommend to use Custom Metadata Type because of the following reasons

  • Custom metadata records travel with your object which is not possible with custom settings

  • Custom metadata is customizable, deployable, packageable, and upgradeable application metadata.

  • Because the records are metadata, you can migrate them using packages or Metadata.API tools.
  • Custom metadata fields are manageable, which means that the developer of a type can decide who can change field values after they are deployed to a subscriber organization.

    • Locked after release—For any record of the type, the value of the field is immutable after deployment, even on the developer organization where the record was created.

    • Subscriber editable—Anyone with the correct permissions can change the value of the field at will. Any changes the developer deploys do not overwrite values in the subscriber's organization.

    • Upgradable—The developer of a record can change the value of the field by releasing a new version of the custom metadata package. The subscriber can’t change the value of the field.

Following table will do clear comparison with custom settings.

enter image description here

You must log in to answer this question.

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