How to get user’s permission sets in Data Repeaters filters

I have custom field (multiselect picklist) on Question object, which we use to filter the displayed records in accordance with his permissoin sets. On visualforce pages it’s implemented using SOQL filtering.

But also we use salesforce community and site.com pages in our project, where Question records are displayed with Data Repeaters. And I want to implement similar filtering functionality here. Maybe someone know how can I get access to current user’s permission sets in Data Repeaters filters or how can I implement this in other ways?

Answer

Unfortunately, there seems to be no way of referencing a User’s permission set in filters (and thus Data Repeaters).
What I’d do in this situation is leverage a hierarchy-custom setting. This would allow you to specify a certain value, based on the user’s profile, while you can add exceptions pretty easily for certain users.

In the filter (formula only) you can then simply evaluate the custom setting value as {!$Setup.CustomSettingName__c.CustomFieldName__c} and it’ll return the current user’s specific value.

Would that be a viable option for you?

Attribution
Source : Link , Question Author : Hleb Kastseika , Answer Author : 0ff

Leave a Comment