1

I'm looking to add functionality to my managed package that would dynamically create a trigger based on user inputs. I've seen some conflicting answers about whether a trigger can be created using the REST or Tooling API, does anyone have any experience creating a trigger on the fly?

The functionality I'm looking for would allow them to set up a trigger within our app without the need for first writing the trigger in a sandbox, writing the test case, deploying, etc.

1
  • Did you manage to accomplish it ? Commented Jan 11, 2022 at 19:19

2 Answers 2

4

Take a look at the Declarative roll up summary tool for an example of dynamically creating triggers

Declarative roll up summary

0

The tooling API works great in Sandboxes and Dev orgs, but not in Enterprise orgs. I described how to do it with the SOAP API under another question Dynamic Trigger Creation From Managed Package

You must log in to answer this question.

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