Dynamic Trigger import using Apex Class
Under Point Threshold
We are building a product where we are working with Standard and custom objects. Here we need to import a generic trigger code to all the objects where user wants to use our system.
So we need to create here a configuration page, where from the objects will be chosen, and if need to change the code for condition checking, will be done here. And the changed code will be uploaded in salesforce trigger for each of the objects from this Apex class.
So I need some Apex class where we can set a body as trigger code, can activate that code and can choose an object. After creating an instance of such class, we will be able to insert the trigger.
Please think about it. I think it may be possible because all the apex classes and triggers are stored in database.