This repo contains some examples of Trigger Development using the MicroTrigger Framework.
The MicroTrigger Examples repo is dependent on the MicroTrigger Framework so the MicroTrigger Framework needs to be installed/deployed in the Org or Scratch Org first.
- Clone the MicroTrigger Framework repo, then create an Unlocked Package and Unlocked Package version. In the sfdx-project.json file, replace the MICROTRIGGERFRAMEWORK_PACKAGE_ID with the created Package ID.
- Create a Scratch Org and install the MicroTrigger Framework in the Scratch Org.
- Clone the current repo then deploy to your Scratch Org.
The MicroTrigger Examples project has 2 artifacts:
- Rollups: This artifact some examples of Rollups logic. In this example, we create some rollup trigger logic from Payment Object to Opportunity and Account.
- Common: This artifact contains the common components (Schema, Layouts, Objects Profiles and Apex Triggers).