You need to sign in to do that
Don't have an account?
Admin User 476
Unable to query the 'IsSandbox' field of 'Organization' object
Hi,
As per the summer'14 release notes, salesforce has added the read-only fields InstanceName and IsSandbox to the Organization object. I'm trying to add the following query to my apex classes:
Organization currOrg = [Select IsSandbox from Organization limit 1];
But when I try to save the code, I'm getting the following error:
No such column 'IsSandbox' on entity 'Organization'.
It works fine if I run the above query using developer console, returning 1 row with OrgId and true (testing in sandbox). I don't understand why I can't save my apex classes with this query. Any help is appreciated.
Thanks!
As per the summer'14 release notes, salesforce has added the read-only fields InstanceName and IsSandbox to the Organization object. I'm trying to add the following query to my apex classes:
Organization currOrg = [Select IsSandbox from Organization limit 1];
But when I try to save the code, I'm getting the following error:
No such column 'IsSandbox' on entity 'Organization'.
It works fine if I run the above query using developer console, returning 1 row with OrgId and true (testing in sandbox). I don't understand why I can't save my apex classes with this query. Any help is appreciated.
Thanks!
All Answers