0

I'm having an issue with a custom Page/Controller in that, it is fully operational in production if I (the creator, I'm also a system admin) access it, but to everyone else it displays the error

"List has no rows for assignment to SObject

An unexpected error has occurred. Your development organization has been notified."

Now I know this message is related to a query being unable to find any records, but what is confusing is that if I run the page using the login of another admin with the same permissions as me, it doesn't work either, and displays this error, and I've looked around a lot into the permissions of the various user accounts I've tried this on and I can't figure it out. Does anyone have any ideas on solving this?

4
  • Is there something about your record ownership setup that would block him from seeing the records in question? Checking out the query in the Dev console as both users might help.
    – Jagular
    Jun 24, 2014 at 19:47
  • This sounds related to sharing rules - do you have anything other than "Public Read/Write" set? (Though AFAIK any SA always has the "View All Data" permission so the fact the other SA can't see the data either suggests some other problem.)
    – Keith C
    Jun 24, 2014 at 19:55
  • Is there a particular filter on the query that is user specific? Showing the actual code of the query might help too.
    – dphil
    Jun 24, 2014 at 20:36
  • It turned out, to be an oversight on my part. There was a field that I queried that should have been filled out but was not required. Most users left it blank, and it just happened by pure chance that every object I checked had it filled out.
    – Austen
    Jun 24, 2014 at 21:20

1 Answer 1

1

It turned out, to be an oversight on my part. There was a field that I queried that should have been filled out but was not required. Most users left it blank, and it just happened by pure chance that every object I checked had it filled out.

1
  • 1
    Don't forget about sharing rules as well. You may have the same permissions but if you dont have at least read all access you will not be able to see certain records if the sobject is set as private using role hierarchies
    – Double A
    Jul 2, 2014 at 17:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .