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

Need trigger to pull Opp name
Hello,
I'm new to triggers and struggling with this. I need a trigger that pulls the Opportunity name and creates a new record in my custom object, AE Opp. I do not need it to create a lookup or link it to the opp, i just need it to create a whole new record so that I can create a task on it.. Is this feasible?
I'm new to triggers and struggling with this. I need a trigger that pulls the Opportunity name and creates a new record in my custom object, AE Opp. I do not need it to create a lookup or link it to the opp, i just need it to create a whole new record so that I can create a task on it.. Is this feasible?
Try this.
All Answers
An example: we could build a trigger that is designed to initiate when you create Opportunity, automatically pull the Opportunity name and create the custom object record. Or we could also build a trigger that does the same thing but initiate when you update Opportunity instead.
Since you need the Opportunity name to create the new record in the custom object, then chances are the trigger will need to be initiated from an action involving Opportunity, but which one that is will depend on your need and will need to be elaborated.
Please try above code.
Thanks,
Gaurav
skype: gaurav62990
I received an error when I tried your code. (Error: Compile Error: Unexpected token 'List'. at line 1 column 1.. did I missenter something?
To answer your question: The trigger would need to pull once the opportunity is created, that way the AE team can look at the AE Opp custom object..
Thank you!
Try this
Thanks,
Gaurav
Skype: gaurav62990
The trigger worked kind of (I had to change some of the verbiage as the API name was different), however, when I create a new Opportunity, it does not create the new record in the AE Opps tab. What could I be doing incorrectly?
Thanks!
Hi Sabrina,
Could you please check if there any required fields on AE_Opp__c. Then that need to be populated too.
Thanks,
Gaurav
Thanks!
Try this.
You are the best!!! Thank you so so much!