Hello,
I'm currently using db triggers to update parent counts ( no calculations ) within a onAfterUpdate event. Users are complaining the method takes too long, so I'm investigating HeadlessClient to process this method server side.
I'm wondering if Headless can be used within a db trigger.
Here's my current logic.
Within the onRecordUpdate in the line_items Table, an object with those records where the parent needs to be updated ( changes on amounts or parent foreign key) is created and holds each parent record value to be updated.
These updates are then processed through a 'myLongMethod' within the onAfterUpdate method in the line_items Table, that takes the object and loops through the parent records in that object to update all counts.
What I'd like to do is execute 'myLongMethod' with a Headless.
As far as I can see, I get a callback exception from the callback method with 'global method name' as the data from the JSEvent.
Any idea about what is wrong or if it is simply not possible to use Headless within db triggers ?
Thanks
Ugo