You need to sign in to do that
Don't have an account?
AlexPHP
Why is a trigger not "Is Valid"?
I can't seem to find documentation explaining why a trigger does not have the "Is Valid" flag checked on the Setup interface.
Can somebody shed some light on this or reference me to a resource explaining this?
Much appreciated.
All Answers
Ah, that indeed seems to do the trick. I wonder what the repercussions, if any, there are with leaving it as "invalid".
In either case, thanks for the tip!
I asked one of the PMs this same question a month or so ago. Here is his response:
"So it may sound strange, but you don’t need to care if the class is invalid or valid. We’ve been meaning to remove that field from the UI. It’s really an internal detail of salesforce. The class for your purposes is valid so long as it compiles."
HTH
Jeff Douglas
Appirio, Inc.
http://blog.jeffdouglas.com
It's actually documented in the apex developer's guide, but you have to search for "isvalid" as opposed to "is valid" - took me some time to figure that out!
--- snip ---
Note: Triggers are stored with an isValid flag that is set to true as long as dependent metadata has not changed
since the trigger was last compiled. If any changes are made to object names or fields that are used in the trigger,
including superficial changes such as edits to an object or field description, the isValid flag is set to false until the
Apex compiler reprocesses the code. Recompiling occurs when the trigger is next executed, or when a user re-saves
the trigger in metadata.
--- snip ---
One important thing I noted was it is must for a Scheduled class to have IS VALID ticked.