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
slxdeveloperslxdeveloper 

isValid Apex Class issues

Everytime I save any updates to my Classes, the isValid flag gets turned off.  But if I go in to the class thru the UI and just save it, it's back to being valid.  Anyone else have this issue?  This just started happening in our Sandbox environment right after the Spring 11 upgrades.

bob_buzzardbob_buzzard

According to the web services api, this flag "Indicates whether any dependent metadata has changed since the class was last compiled (true) or not (false).", so it doesn't mean the class is invalid, but more that it hasn't been verified as valid.  I'd expect it to be compiled upon deployment, but maybe that mechanism has changed for Spring 11.

slxdeveloperslxdeveloper

the problem is that with that flag getting reset from the IDE, you can't schedule the class to run under the Apex Scheduler unless you manually go in thru the UI and do a save.  It didn't do this before Spring '11