function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jordan SmytheJordan Smythe 

Triggers - My first AppExchange App

I am currently trying to create my first AppExchange app and am running into some difficulties trying to figure some stuff out while learning how salesforce works. I am trying to create a trigger for on save but I want to know if I can dynamically change the object it does the trigger on, more specifically the trigger object would be different for each person who installed the app.

Is this possible or do I have to design the trigger to work on a specific object that anyone who used it would have to have.

Thanks in Advance,

J
Adam OlshanskyAdam Olshansky

If you want the Triggers to be Object Independent, you'll probably want to implement a Trigger Handler framework as outlined here: https://krishhari.wordpress.com/2013/07/22/an-architecture-framework-to-handle-triggers-in-the-force-com-platform/.  I'd also recommend purchasing Dan Appleman's book http://advancedapex.com/ which has some great design patterns as well
Jordan SmytheJordan Smythe
Thanks you very much, this could be exactly what I'm looking for!