function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TaoDuhTaoDuh 

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();
    en.subjectMutation(Trigger.new);
}

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?