+ Start a Discussion
MPetersenMPetersen 

Trigger - Help with Invalid Type

Hello,

I've recently started working with triggers and I seem to be having problems with custom objects.  I've tried this a few different ways, but I get either Invalid Type(what this is getting now) or Invalid sObject if I try to query SFDC_Bug_c.  

 

Any help you could give me would be greatly appreciated.

 

Thanks,

 

 

trigger SendToBug on Case (before update) {
   
    for(Case c : Trigger.new){
        if(c.Reason == 'Bug')   
            SDFC_Bug_c b = new SDFC_Bug_c(Status_c='Open', Priority_c='P3-Medium', Problem_Description_c = c.Description);
            insert b;
           
    }
}

Best Answer chosen by Admin (Salesforce Developers) 
gtuerkgtuerk
You are querying SDFC_Bug_c not SFDC_Bug__c.  that's your problem.  Two underscores between object name and the 'c' and transpose the D and F
Message Edited by gtuerk on 05-08-2009 08:04 AM

All Answers

gtuerkgtuerk
You are querying SDFC_Bug_c not SFDC_Bug__c.  that's your problem.  Two underscores between object name and the 'c' and transpose the D and F
Message Edited by gtuerk on 05-08-2009 08:04 AM
This was selected as the best answer
MPetersenMPetersen
Thanks so much.  That's what it was.