+ Start a Discussion

Why do I get "invalid type" with this code?

I have a Class and a Trigger:

public class TempSetEventName {
    public void subjectMutation(Event[] evts){
        for (Event e:evts){
            if (e.Subject == 'Todd') e.Subject = 'Should upd oppt ' + e.WhatId;


trigger opportunityStatusUpdate on Event (before insert) {
    TempSetEventName en = new TempSetEventName();

I get an "Invalid type: TempSetEventName" on the first code line of the trigger.  Changing the method to static and attempting static access has the same result.

My project has a Namespace prefix (VistageApexTest).  I tried prepending that to no avail.

Can anyone tell what I am missing?