0

I want to create a spreadsheet that documents a permission set's field permissions, but I want to show the labels as well as the API names for both the object and the fields themselves. The SObjectType and Field fields in FieldPermissions are both picklists(!?) rather than something useful, so it appears to me that I can't get the information directly via an SOQL query. Is there some trick I'm not aware of? (For SOQL, not Apex.)

Assuming not, I can write some Apex to get the Fields from FieldPermissions and then do what's needed to get the labels for both the fields and objects. At that point is the best option to use Batch Apex to bulk insert the data into a custom object and then just do a report on that object? That seems like a lot of duplication, but I can't think of an easier way to do it.

I've searched around on the web and GitHub, and can't find anything (other than a for-fee AppExchange package) that will do what I'm looking for. (The "free" version of the packages only does PDF export, not spreadsheet/CSV).

2
  • That question has nothing to do with this one; it's asking why particular fields weren't returned. I know how to get field level permissions from SOQL, and explicitly said so in my question. My question is about getting the field and object label instead of just the information that is in FieldPermissions, and whether creating a new object to contain the information is the best way to report on that information.
    – vr8ce
    Mar 13, 2020 at 22:00
  • The answer has info on using the REST API to handle getting field labels and fields that don't show up in your SOQL query (only shows "enabled" field permissions) which is relevant to your question. The rest (is loading it into a custom object the best option) has a subjective nature to it. It seems like a fine option, but I don't know your intentions with it (running reports constantly, only once in a while, large amount of data, etc). If you're only looking to do smaller reports on specific permission sets once a while, you could look at creating a .csv in apex to avoid the custom object. Mar 15, 2020 at 14:31

0

You must log in to answer this question.

Browse other questions tagged .