How to populate a table with records the user can't see?

We have two custom objects - let’s call them “bucket” and “stuff”. A bucket can contain zero to N stuff records e.g. there is a lookup relationship from stuff to bucket. Because it is a lookup relationship stuff has it’s own _share object. Because of the way stuff is being bucket(ed), users that can see the stuff related to a bucket may not be able to see all of the stuff related to the bucket.

We have a requirement for a bucket Skuid page that has two tabs - a tab that lists the stuff in that bucket that the user has read or read/write permissions on and a tab that lists the stuff that the user does not have permission to read.

To the best of my knowledge I can’t use a model to display the list of stuff records the user can’t at least read. In a class.method “without sharing” I can get at the unreadable stuff records, but how do I pass them back out to Skuid to be displayed on the page? Or (hopefully) is there an easier way to tackle this?

Umm…  Skuid is not going to be real helpful if you are trying to get around the salesforce security model.  

Having said that,  I think I understand what you are trying to do.  If a user doesn’t have read access to a stuff record,  you still want them to be able to see a few fields,  but not everthing, and certainly not edit.   I don’t think that is feasible with standard salesforce security model.  But maybe there are some options. 

- You might create another sObject that poplates the selected fields based on workflow or a trigger.  
- You might also review this tutorial about building models on the fly:

@Rob - Yep, you understand the requirement. I really do not want to create and maintain a lightweight mini-mirror of the stuff object. I can fairly easily create an APEX class that runs without sharing and that returns a list of lists containing the data I want to display. Am I overly optimistic to hope that I can call the method and then display the list of lists in a Skuid table? If the answer is “yes, Andy, you are far too optimistic” :slight_smile: , other than a model is there a way to get tables (rows, columns) of data from SFDC and display the data on a page?

Andy,  you should be able to use the CreateRow method of our Model API to introduce data returned from your APEX class into a Skuid model.  Look here:

Good luck. 

Were you able to make this work? I’m curious as I have a similar requirement.

I, as well, would prefer to not create a mirror object to expose Events that I’d like to show to the user.

@Pat - We ended up not rendering the tab that was supposed to display the data the user was not able to view. I do still need to get this working, though. If you figure it out please post your solution here :slight_smile:

We’re likely going to create a mirror object for my requirement.