You need to sign in to do that
Don't have an account?
snievas
Keep trigger from inserting record
What is the best way to keep an object from actually being inserted using triggers? I have a custom helper object that I do not need/want any records created for it.
Why not do this just using permissions on the object?
Visit your security Profiles and all the objects, custom and standard are listed there with their CRUD permissions. Just disallow creation.
If you *must* do this with a trigger for some reason I can't fathom, I'd think you could write a before-insert trigger on the object which just does a Trigger.new.clear() and thus blows away all the records in the Trigger.new list before they are actually created.
However, security is a better way to go, followed perhaps by leaving security alone and removing the "New" button from all page layouts. (which may not be sufficient to your needs.).
Best, Steve.