Skip to main content
Nintex Community Menu Bar
Question

Is there a SKUID equivalent to 'System.runAs(User u)'?

  • Jul 11, 2024 1:09 PM UTC
  • 6 replies
  • 62 views
  • Translate All

Forum|alt.badge.img+7

I have some sensitive data that I’d like to report on in aggregate and have all my users be able to access. So while they shouldn’t have access to the individual records, they should have access to reports and charts based on this aggregated data. I can’t use SKUID charts because it requires users to have access to the records first. Is there a way to query a model as a different user?

This topic has been closed for replies.

6 replies

Forum|alt.badge.img+13

Eulogio, the only way to do this is to create an Apex REST API in Salesforce that performs the aggregate queries on the data and exposes it regardless of sharing settings. You can then use a REST Model in Skuid to retrieve data from this custom REST API and display it within Skuid. 

Translate

Forum|alt.badge.img+7

Thanks for the recommendation Zach! I’ll try your method.

Translate

Forum|alt.badge.img+7

Hi Zach,

I was able to create a RestResource and connect it to Skuid via a REST model, but I’m not able to get any data to come through.  This is what I’m receiving:

{type: "TBC_Demographics_Survey_Response__c", url: "/services/data/v42.0/sobjects/TBC_Demographics_Survey_Response__c/a5L80000000643wEAA", __skuid_record__: ba}


Not sure if this request is within your scope of obligation, but do you know what may be causing this? How do I get my data to pipe through instead of this url? My Apex class is returning a list of objects, but the data itself does not come through. Any advice would be appreciated.


Thanks!
Eulogio

Translate

Forum|alt.badge.img+7

Ignore my last message! I figured out what was wrong, I had an incorrect ‘Path to Contents’. Thanks anyways 🙂

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • Jul 11, 2024 1:30 PM UTC

Glad you got it working! 

Translate

Forum|alt.badge.img+8

Could you share your solution? I too have the same request, but I need to create records on an object that my users don’t have access to.

Translate