+ Start a Discussion

add error and create separate object

i was trying to add an error on event if meetings coincide and wanted to create an log object indicating that a conflict occured. I would appreciate if anyone knew if this were possible - that is, both rollback of the object on which the trigger is defined and some method of adding a separate object.

thank you.


Use a before trigger. Adding error to a object will rollback the whole transaction.


Try using try catch and insert the error log record in the catch


i am trying to have a trigger called on event and within this trigger have a mechanism to create something to which the rollback doesn't apply (both rollback and save). Simply rolling back the whole operation is insufficient for my needs.

Thank you anyway.



Also i should mention that i do not have access to the place where the event is created and thus a try catch block is not able to be used.