You need to sign in to do that
Don't have an account?

sObject type 'Site' is not supported
This is fun. If you run this block of APEX in the system log everything works without issue...
Site mySite = [Select AnalyticsTrackingCode From Site where Name = 'My_Portal' limit 1]; System.debug(mySite.analyticsTrackingCode);
BUT, if you put the same block of APEX in a class and try to save the class you get: Save error: sObject type 'Site' is not supported.
What is up with that?
Is your class set to the latest api version ?
All Answers
That's odd, it worked for me.
Is your class set to the latest api version ?
Simon, what would we do without you?
It is an older class so no, not using the latest api, but tomorrow it will be.
I think this is the 3rd time I have forgotten to check the api version for issues like this. You would think I would have learned by now!
Thanks a bunch Simon!
Tim -