I am attempting to design a managed package that performs a specific action on a custom object. I can include the custom object in the package and let customers use that object to access the functionality I am attempting to provide.
Where the challenge comes in is providing the same functionality on one of their existing custom objects. Obviously I can use Batch Apex with Dynamic Apex or even provide an API of sorts, but I want it to be real time and don't want my customers to have to write code if I can avoid it.
Is there any way to dynamically build a trigger that would work on any custom object outside of my own namespace?
I know a solution would be to use the Metadata API to create the trigger on the fly, but then it wouldn't be in my managed package namespace, correct? It would make it difficult for updating the code?