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

Error on Organization object
I am getting the following error for a Salesforce Standard User:
"System.Exception: No such column 'Name' on entity 'Organization'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."
For a Salesforce System Administrator, I do not get this error, which leads me to believe it is a permission issue. However, when I go to Administration Setup -> Security Controls -> Field Accessibility, the 'Organization' object is not present with the other standard objects (Account, Contact, etc.).
Additionally, this error is occurring in a managed package. In version 1.8 of my managed package, I did not receive this error with a Salesforce Standard User. However, the error is occurring in version 1.9 of my managed package although the error-causing code did not change. Maybe there was an error with the upgrade?
For completeness, here is the Apex code that is causing this error:
List<Organization> orgList = [Select o.Name, o.Id From Organization o];
Thanks in advance!
"System.Exception: No such column 'Name' on entity 'Organization'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."
For a Salesforce System Administrator, I do not get this error, which leads me to believe it is a permission issue. However, when I go to Administration Setup -> Security Controls -> Field Accessibility, the 'Organization' object is not present with the other standard objects (Account, Contact, etc.).
Additionally, this error is occurring in a managed package. In version 1.8 of my managed package, I did not receive this error with a Salesforce Standard User. However, the error is occurring in version 1.9 of my managed package although the error-causing code did not change. Maybe there was an error with the upgrade?
For completeness, here is the Apex code that is causing this error:
List<Organization> orgList = [Select o.Name, o.Id From Organization o];
Thanks in advance!
Just checked the API reference guide (should have started there, I guess), and it indicates the user needs "View All Data" to see this object.
All Answers
Jim, Thanks for your quick reply.
I looked at the permissions on my Salesforce Standard User, and that user has the 'View Setup and Configuration' permission checked under 'Administrative Permissions'.
Could it be related to an upgrade to the managed package? (I did not get this error before I upgraded the package with the Salesforce Standard User and the error-causing code did not change in the upgrade.)
Just checked the API reference guide (should have started there, I guess), and it indicates the user needs "View All Data" to see this object.