• Brandon Isaac Fonseca
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Trigger name exists on different SObject type: Quote
I had a trigger that I initially wanted to work just before a Quote is saved, but we decided to move the trigger to the Opportunity object instead of the quote. I had originally set it up like this:
trigger PSGProjectDeleteTrigger on Quote (before update) {
    for(Quote quoteSelected : Trigger.new){ CODE TO COMPLETE WHEN TRIGGER FIRES }
I was able to save the trigger like that, but when I went back to it and changed it to :
trigger PSGProjectDeleteTrigger on Opportunity (before update) {
    for(Opportunity projectSelected : Trigger.new){ CODE TO COMPLETE WHEN TRIGGER FIRES }
I receive the following error:
Error: Compile Error: Trigger name exists on different SObject type: Quote at line 1 column 1

I found a post about this that suggested not using the developer console and instead going to setup>develop>apex triggers and editing it their directly. I did that and still receive the same error.

Another post suggested that I chang the name of the trigger so I added the number two to the end of the trigger name and still receive the same error.

Both Quote and Opportunity are standard objects so I am sure there is no problem with the object names.

Any ideas?????