You need to sign in to do that
Don't have an account?

Creating new record with Apex Trigger
I have a custom object called Charter with a lookup relationship with accounts. I have created an apex trigger in opportunity to create Charter records. I am not getting any errors with the trigger but the records are also not created.
Does anyone knows why is this happening or is what I am trying to do even possible?
Does anyone knows why is this happening or is what I am trying to do even possible?
Use System.debugs to identify what going on. Also, in system debugd check if any DML in happenning or not.
1. My opening IF statement is excluding the records for which I want to trigger to fire on.
2. When creating related objects make sure the trigger is firing after insert.
3. Make sure you are including all required fields for the related objects being created.